<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">{-
(c) The University of Glasgow 2006
(c) The AQUA Project, Glasgow University, 1998


This module contains definitions for the IdInfo for things that
have a standard form, namely:

- data constructors
- record selectors
- method and superclass selectors
- primitive operations
-}</span><span>
</span><span id="line-14"></span><span>
</span><span id="line-15"></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}</span><span>
</span><span id="line-18"></span><span>
</span><span id="line-19"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Types.Id.Make</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-20"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Make.html#mkDictFunId"><span class="hs-identifier">mkDictFunId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#mkDictFunTy"><span class="hs-identifier">mkDictFunTy</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#mkDictSelId"><span class="hs-identifier">mkDictSelId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#mkDictSelRhs"><span class="hs-identifier">mkDictSelRhs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Make.html#mkPrimOpId"><span class="hs-identifier">mkPrimOpId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#mkFCallId"><span class="hs-identifier">mkFCallId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Make.html#unwrapNewTypeBody"><span class="hs-identifier">unwrapNewTypeBody</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#wrapFamInstBody"><span class="hs-identifier">wrapFamInstBody</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Make.html#DataConBoxer"><span class="hs-identifier">DataConBoxer</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#vanillaDataConBoxer"><span class="hs-identifier">vanillaDataConBoxer</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Make.html#mkDataConRep"><span class="hs-identifier">mkDataConRep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#mkDataConWorkId"><span class="hs-identifier">mkDataConWorkId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span>        </span><span class="hs-comment">-- And some particular Ids; see below for why they are wired in</span><span>
</span><span id="line-29"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Make.html#wiredInIds"><span class="hs-identifier">wiredInIds</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#ghcPrimIds"><span class="hs-identifier">ghcPrimIds</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Make.html#realWorldPrimId"><span class="hs-identifier">realWorldPrimId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Make.html#voidPrimId"><span class="hs-identifier">voidPrimId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#voidArgId"><span class="hs-identifier">voidArgId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Make.html#nullAddrId"><span class="hs-identifier">nullAddrId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#seqId"><span class="hs-identifier">seqId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#lazyId"><span class="hs-identifier">lazyId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Builtin.Names.html#lazyIdKey"><span class="hs-identifier">lazyIdKey</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Make.html#coercionTokenId"><span class="hs-identifier">coercionTokenId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#magicDictId"><span class="hs-identifier">magicDictId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#coerceId"><span class="hs-identifier">coerceId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Make.html#proxyHashId"><span class="hs-identifier">proxyHashId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#noinlineId"><span class="hs-identifier">noinlineId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#noinlineIdName"><span class="hs-identifier">noinlineIdName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>        </span><span class="annot"><a href="GHC.Types.Id.Make.html#coerceName"><span class="hs-identifier">coerceName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span>        </span><span class="hs-comment">-- Re-export error Ids</span><span>
</span><span id="line-38"></span><span>        </span><span class="hs-keyword">module</span><span> </span><span class="annot"><a href="GHC.Core.Opt.ConstantFold.html"><span class="hs-identifier">GHC.Core.Opt.ConstantFold</span></a></span><span>
</span><span id="line-39"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.Prim.html"><span class="hs-identifier">GHC.Builtin.Types.Prim</span></a></span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Types.html"><span class="hs-identifier">GHC.Builtin.Types</span></a></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Opt.ConstantFold.html"><span class="hs-identifier">GHC.Core.Opt.ConstantFold</span></a></span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Type.html"><span class="hs-identifier">GHC.Core.Type</span></a></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Multiplicity.html"><span class="hs-identifier">GHC.Core.Multiplicity</span></a></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html"><span class="hs-identifier">GHC.Core.TyCo.Rep</span></a></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.FamInstEnv.html"><span class="hs-identifier">GHC.Core.FamInstEnv</span></a></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Coercion.html"><span class="hs-identifier">GHC.Core.Coercion</span></a></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Utils.TcType.html"><span class="hs-identifier">GHC.Tc.Utils.TcType</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">TcType</span></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Make.html"><span class="hs-identifier">GHC.Core.Make</span></a></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html"><span class="hs-identifier">GHC.Core.FVs</span></a></span><span>     </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#mkRuleInfo"><span class="hs-identifier">mkRuleInfo</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Utils.html"><span class="hs-identifier">GHC.Core.Utils</span></a></span><span>   </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.Utils.html#mkCast"><span class="hs-identifier">mkCast</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Utils.html#mkDefaultCase"><span class="hs-identifier">mkDefaultCase</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Unfold.html"><span class="hs-identifier">GHC.Core.Unfold</span></a></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Literal.html"><span class="hs-identifier">GHC.Types.Literal</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html"><span class="hs-identifier">GHC.Core.TyCon</span></a></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Class.html"><span class="hs-identifier">GHC.Core.Class</span></a></span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html"><span class="hs-identifier">GHC.Types.Name.Set</span></a></span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.PrimOps.html"><span class="hs-identifier">GHC.Builtin.PrimOps</span></a></span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.ForeignCall.html"><span class="hs-identifier">GHC.Types.ForeignCall</span></a></span><span>
</span><span id="line-65"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html"><span class="hs-identifier">GHC.Core.DataCon</span></a></span><span>
</span><span id="line-66"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.html"><span class="hs-identifier">GHC.Types.Id</span></a></span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html"><span class="hs-identifier">GHC.Types.Id.Info</span></a></span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Demand.html"><span class="hs-identifier">GHC.Types.Demand</span></a></span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Cpr.html"><span class="hs-identifier">GHC.Types.Cpr</span></a></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.html"><span class="hs-identifier">GHC.Core</span></a></span><span>
</span><span id="line-71"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span>
</span><span id="line-72"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html"><span class="hs-identifier">GHC.Types.Unique.Supply</span></a></span><span>
</span><span id="line-73"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Names.html"><span class="hs-identifier">GHC.Builtin.Names</span></a></span><span>
</span><span id="line-74"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>       </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#SuccessFlag"><span class="hs-identifier">SuccessFlag</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-75"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-76"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-77"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-78"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-79"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.List.SetOps.html"><span class="hs-identifier">GHC.Data.List.SetOps</span></a></span><span>
</span><span id="line-80"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.html"><span class="hs-identifier">GHC.Types.Var</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#VarBndr"><span class="hs-identifier">VarBndr</span></a></span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Bndr"><span class="hs-identifier">Bndr</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-81"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.LanguageExtensions.html#"><span class="hs-identifier">GHC.LanguageExtensions</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">LangExt</span></span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Maybe.html#"><span class="hs-identifier">Data.Maybe</span></a></span><span>       </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.Maybe.html#maybeToList"><span class="hs-identifier">maybeToList</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Wired in Ids}
*                                                                      *
************************************************************************

Note [Wired-in Ids]
~~~~~~~~~~~~~~~~~~~
A &quot;wired-in&quot; Id can be referred to directly in GHC (e.g. 'voidPrimId')
rather than by looking it up its name in some environment or fetching
it from an interface file.

There are several reasons why an Id might appear in the wiredInIds:

* ghcPrimIds: see Note [ghcPrimIds (aka pseudoops)]

* magicIds: see Note [magicIds]

* errorIds, defined in GHC.Core.Make.
  These error functions (e.g. rUNTIME_ERROR_ID) are wired in
  because the desugarer generates code that mentions them directly

In all cases except ghcPrimIds, there is a definition site in a
library module, which may be called (e.g. in higher order situations);
but the wired-in version means that the details are never read from
that module's interface file; instead, the full definition is right
here.

Note [ghcPrimIds (aka pseudoops)]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ghcPrimIds

  * Are exported from GHC.Prim

  * Can't be defined in Haskell, and hence no Haskell binding site,
    but have perfectly reasonable unfoldings in Core

  * Either have a CompulsoryUnfolding (hence always inlined), or
        of an EvaldUnfolding and void representation (e.g. void#)

  * Are (or should be) defined in primops.txt.pp as 'pseudoop'
    Reason: that's how we generate documentation for them

Note [magicIds]
~~~~~~~~~~~~~~~
The magicIds

  * Are exported from GHC.Magic

  * Can be defined in Haskell (and are, in ghc-prim:GHC/Magic.hs).
    This definition at least generates Haddock documentation for them.

  * May or may not have a CompulsoryUnfolding.

  * But have some special behaviour that can't be done via an
    unfolding from an interface file
-}</span><span>
</span><span id="line-143"></span><span>
</span><span id="line-144"></span><span class="annot"><a href="GHC.Types.Id.Make.html#wiredInIds"><span class="hs-identifier hs-type">wiredInIds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-145"></span><span id="wiredInIds"><span class="annot"><span class="annottext">wiredInIds :: [Var]
</span><a href="GHC.Types.Id.Make.html#wiredInIds"><span class="hs-identifier hs-var hs-var">wiredInIds</span></a></span></span><span>
</span><span id="line-146"></span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">[Var]
</span><a href="GHC.Types.Id.Make.html#magicIds"><span class="hs-identifier hs-var">magicIds</span></a></span><span>
</span><span id="line-147"></span><span>  </span><span class="annot"><span class="annottext">[Var] -&gt; [Var] -&gt; [Var]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="GHC.Types.Id.Make.html#ghcPrimIds"><span class="hs-identifier hs-var">ghcPrimIds</span></a></span><span>
</span><span id="line-148"></span><span>  </span><span class="annot"><span class="annottext">[Var] -&gt; [Var] -&gt; [Var]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="GHC.Core.Make.html#errorIds"><span class="hs-identifier hs-var">errorIds</span></a></span><span>           </span><span class="hs-comment">-- Defined in GHC.Core.Make</span><span>
</span><span id="line-149"></span><span>
</span><span id="line-150"></span><span class="annot"><a href="GHC.Types.Id.Make.html#magicIds"><span class="hs-identifier hs-type">magicIds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span>    </span><span class="hs-comment">-- See Note [magicIds]</span><span>
</span><span id="line-151"></span><span id="magicIds"><span class="annot"><span class="annottext">magicIds :: [Var]
</span><a href="GHC.Types.Id.Make.html#magicIds"><span class="hs-identifier hs-var hs-var">magicIds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#lazyId"><span class="hs-identifier hs-var">lazyId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#oneShotId"><span class="hs-identifier hs-var">oneShotId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#noinlineId"><span class="hs-identifier hs-var">noinlineId</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-152"></span><span>
</span><span id="line-153"></span><span class="annot"><a href="GHC.Types.Id.Make.html#ghcPrimIds"><span class="hs-identifier hs-type">ghcPrimIds</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span>  </span><span class="hs-comment">-- See Note [ghcPrimIds (aka pseudoops)]</span><span>
</span><span id="line-154"></span><span id="ghcPrimIds"><span class="annot"><span class="annottext">ghcPrimIds :: [Var]
</span><a href="GHC.Types.Id.Make.html#ghcPrimIds"><span class="hs-identifier hs-var hs-var">ghcPrimIds</span></a></span></span><span>
</span><span id="line-155"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#realWorldPrimId"><span class="hs-identifier hs-var">realWorldPrimId</span></a></span><span>
</span><span id="line-156"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#voidPrimId"><span class="hs-identifier hs-var">voidPrimId</span></a></span><span>
</span><span id="line-157"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#nullAddrId"><span class="hs-identifier hs-var">nullAddrId</span></a></span><span>
</span><span id="line-158"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#seqId"><span class="hs-identifier hs-var">seqId</span></a></span><span>
</span><span id="line-159"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#magicDictId"><span class="hs-identifier hs-var">magicDictId</span></a></span><span>
</span><span id="line-160"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#coerceId"><span class="hs-identifier hs-var">coerceId</span></a></span><span>
</span><span id="line-161"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#proxyHashId"><span class="hs-identifier hs-var">proxyHashId</span></a></span><span>
</span><span id="line-162"></span><span>    </span><span class="hs-special">]</span><span>
</span><span id="line-163"></span><span>
</span><span id="line-164"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Data constructors}
*                                                                      *
************************************************************************

The wrapper for a constructor is an ordinary top-level binding that evaluates
any strict args, unboxes any args that are going to be flattened, and calls
the worker.

We're going to build a constructor that looks like:

        data (Data a, C b) =&gt;  T a b = T1 !a !Int b

        T1 = /\ a b -&gt;
             \d1::Data a, d2::C b -&gt;
             \p q r -&gt; case p of { p -&gt;
                       case q of { q -&gt;
                       Con T1 [a,b] [p,q,r]}}

Notice that

* d2 is thrown away --- a context in a data decl is used to make sure
  one *could* construct dictionaries at the site the constructor
  is used, but the dictionary isn't actually used.

* We have to check that we can construct Data dictionaries for
  the types a and Int.  Once we've done that we can throw d1 away too.

* We use (case p of q -&gt; ...) to evaluate p, rather than &quot;seq&quot; because
  all that matters is that the arguments are evaluated.  &quot;seq&quot; is
  very careful to preserve evaluation order, which we don't need
  to be here.

  You might think that we could simply give constructors some strictness
  info, like PrimOps, and let CoreToStg do the let-to-case transformation.
  But we don't do that because in the case of primops and functions strictness
  is a *property* not a *requirement*.  In the case of constructors we need to
  do something active to evaluate the argument.

  Making an explicit case expression allows the simplifier to eliminate
  it in the (common) case where the constructor arg is already evaluated.

Note [Wrappers for data instance tycons]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In the case of data instances, the wrapper also applies the coercion turning
the representation type into the family instance type to cast the result of
the wrapper.  For example, consider the declarations

  data family Map k :: * -&gt; *
  data instance Map (a, b) v = MapPair (Map a (Pair b v))

The tycon to which the datacon MapPair belongs gets a unique internal
name of the form :R123Map, and we call it the representation tycon.
In contrast, Map is the family tycon (accessible via
tyConFamInst_maybe). A coercion allows you to move between
representation and family type.  It is accessible from :R123Map via
tyConFamilyCoercion_maybe and has kind

  Co123Map a b v :: {Map (a, b) v ~ :R123Map a b v}

The wrapper and worker of MapPair get the types

        -- Wrapper
  $WMapPair :: forall a b v. Map a (Map a b v) -&gt; Map (a, b) v
  $WMapPair a b v = MapPair a b v `cast` sym (Co123Map a b v)

        -- Worker
  MapPair :: forall a b v. Map a (Map a b v) -&gt; :R123Map a b v

This coercion is conditionally applied by wrapFamInstBody.

It's a bit more complicated if the data instance is a GADT as well!

   data instance T [a] where
        T1 :: forall b. b -&gt; T [Maybe b]

Hence we translate to

        -- Wrapper
  $WT1 :: forall b. b -&gt; T [Maybe b]
  $WT1 b v = T1 (Maybe b) b (Maybe b) v
                        `cast` sym (Co7T (Maybe b))

        -- Worker
  T1 :: forall c b. (c ~ Maybe b) =&gt; b -&gt; :R7T c

        -- Coercion from family type to representation type
  Co7T a :: T [a] ~ :R7T a

Newtype instances through an additional wrinkle into the mix. Consider the
following example (adapted from #15318, comment:2):

  data family T a
  newtype instance T [a] = MkT [a]

Within the newtype instance, there are three distinct types at play:

1. The newtype's underlying type, [a].
2. The instance's representation type, TList a (where TList is the
   representation tycon).
3. The family type, T [a].

We need two coercions in order to cast from (1) to (3):

(a) A newtype coercion axiom:

      axiom coTList a :: TList a ~ [a]

    (Where TList is the representation tycon of the newtype instance.)

(b) A data family instance coercion axiom:

      axiom coT a :: T [a] ~ TList a

When we translate the newtype instance to Core, we obtain:

    -- Wrapper
  $WMkT :: forall a. [a] -&gt; T [a]
  $WMkT a x = MkT a x |&gt; Sym (coT a)

    -- Worker
  MkT :: forall a. [a] -&gt; TList [a]
  MkT a x = x |&gt; Sym (coTList a)

Unlike for data instances, the worker for a newtype instance is actually an
executable function which expands to a cast, but otherwise, the general
strategy is essentially the same as for data instances. Also note that we have
a wrapper, which is unusual for a newtype, but we make GHC produce one anyway
for symmetry with the way data instances are handled.

Note [Newtype datacons]
~~~~~~~~~~~~~~~~~~~~~~~
The &quot;data constructor&quot; for a newtype should always be vanilla.  At one
point this wasn't true, because the newtype arising from
     class C a =&gt; D a
looked like
       newtype T:D a = D:D (C a)
so the data constructor for T:C had a single argument, namely the
predicate (C a).  But now we treat that as an ordinary argument, not
part of the theta-type, so all is well.

Note [Newtype workers]
~~~~~~~~~~~~~~~~~~~~~~
A newtype does not really have a worker. Instead, newtype constructors
just unfold into a cast. But we need *something* for, say, MkAge to refer
to. So, we do this:

* The Id used as the newtype worker will have a compulsory unfolding to
  a cast. See Note [Compulsory newtype unfolding]

* This Id is labeled as a DataConWrapId. We don't want to use a DataConWorkId,
  as those have special treatment in the back end.

* There is no top-level binding, because the compulsory unfolding
  means that it will be inlined (to a cast) at every call site.

We probably should have a NewtypeWorkId, but these Ids disappear as soon as
we desugar anyway, so it seems a step too far.

Note [Compulsory newtype unfolding]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Newtype wrappers, just like workers, have compulsory unfoldings.
This is needed so that two optimizations involving newtypes have the same
effect whether a wrapper is present or not:

(1) Case-of-known constructor.
    See Note [beta-reduction in exprIsConApp_maybe].

(2) Matching against the map/coerce RULE. Suppose we have the RULE

    {-# RULE &quot;map/coerce&quot; map coerce = ... #-}

    As described in Note [Getting the map/coerce RULE to work],
    the occurrence of 'coerce' is transformed into:

    {-# RULE &quot;map/coerce&quot; forall (c :: T1 ~R# T2).
                          map ((\v -&gt; v) `cast` c) = ... #-}

    We'd like 'map Age' to match the LHS. For this to happen, Age
    must be unfolded, otherwise we'll be stuck. This is tested in T16208.

It also allows for the posssibility of levity polymorphic newtypes
with wrappers (with -XUnliftedNewtypes):

  newtype N (a :: TYPE r) = MkN a

With -XUnliftedNewtypes, this is allowed -- even though MkN is levity-
polymorphic. It's OK because MkN evaporates in the compiled code, becoming
just a cast. That is, it has a compulsory unfolding. As long as its
argument is not levity-polymorphic (which it can't be, according to
Note [Levity polymorphism invariants] in GHC.Core), and it's saturated,
no levity-polymorphic code ends up in the code generator. The saturation
condition is effectively checked by Note [Detecting forced eta expansion]
in GHC.HsToCore.Expr.

However, if we make a *wrapper* for a newtype, we get into trouble.
The saturation condition is no longer checked (because hasNoBinding
returns False) and indeed we generate a forbidden levity-polymorphic
binding.

The solution is simple, though: just make the newtype wrappers
as ephemeral as the newtype workers. In other words, give the wrappers
compulsory unfoldings and no bindings. The compulsory unfolding is given
in wrap_unf in mkDataConRep, and the lack of a binding happens in
GHC.Iface.Tidy.getTyConImplicitBinds, where we say that a newtype has no
implicit bindings.

Note [Records and linear types]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All the fields, in a record constructor, are linear, because there is no syntax
to specify the type of record field. There will be (see the proposal
https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0111-linear-types.rst#records-and-projections
), but it isn't implemented yet.

Projections of records can't be linear:

  data Foo = MkFoo { a :: A, b :: B }

If we had

  a :: Foo %1 -&gt; A

We could write

  bad :: A %1 -&gt; B %1 -&gt; A
  bad x y = a (MkFoo { a=x, b=y })

There is an exception: if `b` (more generally all the fields besides `a`) is
unrestricted, then is perfectly possible to have a linear projection. Such a
linear projection has as simple definition.

  data Bar = MkBar { c :: C, d # Many :: D }

  c :: Bar %1 -&gt; C
  c MkBar{ c=x, d=_} = x

The `# Many` syntax, for records, does not exist yet. But there is one important
special case which already happens: when there is a single field (usually a
newtype).

  newtype Baz = MkBaz { unbaz :: E }

unbaz could be linear. And, in fact, it is linear in the proposal design.

However, this hasn't been implemented yet.

************************************************************************
*                                                                      *
\subsection{Dictionary selectors}
*                                                                      *
************************************************************************

Selecting a field for a dictionary.  If there is just one field, then
there's nothing to do.

Dictionary selectors may get nested forall-types.  Thus:

        class Foo a where
          op :: forall b. Ord b =&gt; a -&gt; b -&gt; b

Then the top-level type for op is

        op :: forall a. Foo a =&gt;
              forall b. Ord b =&gt;
              a -&gt; b -&gt; b

Note [Type classes and linear types]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Constraints, in particular type classes, don't have attached linearity
information. Implicitly, they are all unrestricted. See the linear types proposal,
https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0111-linear-types.rst .

When translating to core `C =&gt; ...` is always translated to an unrestricted
arrow `C # Many -&gt; ...`.

Therefore there is no loss of generality if we make all selectors unrestricted.

-}</span><span>
</span><span id="line-445"></span><span>
</span><span id="line-446"></span><span class="annot"><a href="GHC.Types.Id.Make.html#mkDictSelId"><span class="hs-identifier hs-type">mkDictSelId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>          </span><span class="hs-comment">-- Name of one of the *value* selectors</span><span>
</span><span id="line-447"></span><span>                             </span><span class="hs-comment">-- (dictionary superclass or method)</span><span>
</span><span id="line-448"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-449"></span><span id="mkDictSelId"><span class="annot"><span class="annottext">mkDictSelId :: Name -&gt; Class -&gt; Var
</span><a href="GHC.Types.Id.Make.html#mkDictSelId"><span class="hs-identifier hs-var hs-var">mkDictSelId</span></a></span></span><span> </span><span id="local-6989586621680829772"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829772"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680829771"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680829771"><span class="hs-identifier hs-var">clas</span></a></span></span><span>
</span><span id="line-450"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdDetails -&gt; Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.html#mkGlobalId"><span class="hs-identifier hs-var">mkGlobalId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Class -&gt; IdDetails
</span><a href="GHC.Types.Id.Info.html#ClassOpId"><span class="hs-identifier hs-var">ClassOpId</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680829771"><span class="hs-identifier hs-var">clas</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829772"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829768"><span class="hs-identifier hs-var">sel_ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680829767"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-451"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-452"></span><span>    </span><span id="local-6989586621680829766"><span class="annot"><span class="annottext">tycon :: TyCon
</span><a href="#local-6989586621680829766"><span class="hs-identifier hs-var hs-var">tycon</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Class -&gt; TyCon
</span><a href="GHC.Core.Class.html#classTyCon"><span class="hs-identifier hs-var hs-var">classTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680829771"><span class="hs-identifier hs-var">clas</span></a></span><span>
</span><span id="line-453"></span><span>    </span><span id="local-6989586621680829764"><span class="annot"><span class="annottext">sel_names :: [Name]
</span><a href="#local-6989586621680829764"><span class="hs-identifier hs-var hs-var">sel_names</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Var -&gt; Name) -&gt; [Var] -&gt; [Name]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Class -&gt; [Var]
</span><a href="GHC.Core.Class.html#classAllSelIds"><span class="hs-identifier hs-var">classAllSelIds</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680829771"><span class="hs-identifier hs-var">clas</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-454"></span><span>    </span><span id="local-6989586621680829761"><span class="annot"><span class="annottext">new_tycon :: Bool
</span><a href="#local-6989586621680829761"><span class="hs-identifier hs-var hs-var">new_tycon</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isNewTyCon"><span class="hs-identifier hs-var">isNewTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829766"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-455"></span><span>    </span><span class="hs-special">[</span><span id="local-6989586621680829759"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829759"><span class="hs-identifier hs-var">data_con</span></a></span></span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [DataCon]
</span><a href="GHC.Core.TyCon.html#tyConDataCons"><span class="hs-identifier hs-var">tyConDataCons</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829766"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-456"></span><span>    </span><span id="local-6989586621680829757"><span class="annot"><span class="annottext">tyvars :: [InvisTVBinder]
</span><a href="#local-6989586621680829757"><span class="hs-identifier hs-var hs-var">tyvars</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [InvisTVBinder]
</span><a href="GHC.Core.DataCon.html#dataConUserTyVarBinders"><span class="hs-identifier hs-var">dataConUserTyVarBinders</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829759"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-457"></span><span>    </span><span id="local-6989586621680829754"><span class="annot"><span class="annottext">n_ty_args :: Arity
</span><a href="#local-6989586621680829754"><span class="hs-identifier hs-var hs-var">n_ty_args</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[InvisTVBinder] -&gt; Arity
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Arity
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[InvisTVBinder]
</span><a href="#local-6989586621680829757"><span class="hs-identifier hs-var">tyvars</span></a></span><span>
</span><span id="line-458"></span><span>    </span><span id="local-6989586621680829752"><span class="annot"><span class="annottext">arg_tys :: [Scaled Type]
</span><a href="#local-6989586621680829752"><span class="hs-identifier hs-var hs-var">arg_tys</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dataConRepArgTys"><span class="hs-identifier hs-var">dataConRepArgTys</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829759"><span class="hs-identifier hs-var">data_con</span></a></span><span>  </span><span class="hs-comment">-- Includes the dictionary superclasses</span><span>
</span><span id="line-459"></span><span>    </span><span id="local-6989586621680829745"><span class="annot"><span class="annottext">val_index :: Arity
</span><a href="#local-6989586621680829745"><span class="hs-identifier hs-var hs-var">val_index</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Assoc Name Arity -&gt; Name -&gt; Arity
forall a b. Eq a =&gt; String -&gt; Assoc a b -&gt; a -&gt; b
</span><a href="GHC.Data.List.SetOps.html#assoc"><span class="hs-identifier hs-var">assoc</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;MkId.mkDictSelId&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680829764"><span class="hs-identifier hs-var">sel_names</span></a></span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; [Arity] -&gt; Assoc Name Arity
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-operator hs-var">`zip`</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Arity
</span><span class="hs-number">0</span></span><span class="hs-glyph">..</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829772"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-460"></span><span>
</span><span id="line-461"></span><span>    </span><span id="local-6989586621680829768"><span class="annot"><span class="annottext">sel_ty :: Type
</span><a href="#local-6989586621680829768"><span class="hs-identifier hs-var hs-var">sel_ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[InvisTVBinder] -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkInvisForAllTys"><span class="hs-identifier hs-var">mkInvisForAllTys</span></a></span><span> </span><span class="annot"><span class="annottext">[InvisTVBinder]
</span><a href="#local-6989586621680829757"><span class="hs-identifier hs-var">tyvars</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Type) -&gt; Type -&gt; Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-462"></span><span>             </span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkInvisFunTyMany"><span class="hs-identifier hs-var">mkInvisFunTyMany</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Class -&gt; [Type] -&gt; Type
</span><a href="GHC.Core.Predicate.html#mkClassPred"><span class="hs-identifier hs-var">mkClassPred</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680829771"><span class="hs-identifier hs-var">clas</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Var] -&gt; [Type]
</span><a href="GHC.Core.TyCo.Rep.html#mkTyVarTys"><span class="hs-identifier hs-var">mkTyVarTys</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[InvisTVBinder] -&gt; [Var]
forall tv argf. [VarBndr tv argf] -&gt; [tv]
</span><a href="GHC.Types.Var.html#binderVars"><span class="hs-identifier hs-var">binderVars</span></a></span><span> </span><span class="annot"><span class="annottext">[InvisTVBinder]
</span><a href="#local-6989586621680829757"><span class="hs-identifier hs-var">tyvars</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Type) -&gt; Type -&gt; Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-463"></span><span>             </span><span class="annot"><span class="annottext">Scaled Type -&gt; Type
forall a. Scaled a -&gt; a
</span><a href="GHC.Core.TyCo.Rep.html#scaledThing"><span class="hs-identifier hs-var">scaledThing</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Scaled Type] -&gt; Arity -&gt; Scaled Type
forall a. Outputable a =&gt; [a] -&gt; Arity -&gt; a
</span><a href="GHC.Data.List.SetOps.html#getNth"><span class="hs-identifier hs-var">getNth</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680829752"><span class="hs-identifier hs-var">arg_tys</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829745"><span class="hs-identifier hs-var">val_index</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-464"></span><span>               </span><span class="hs-comment">-- See Note [Type classes and linear types]</span><span>
</span><span id="line-465"></span><span>
</span><span id="line-466"></span><span>    </span><span id="local-6989586621680829733"><span class="annot"><span class="annottext">base_info :: IdInfo
</span><a href="#local-6989586621680829733"><span class="hs-identifier hs-var hs-var">base_info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#noCafIdInfo"><span class="hs-identifier hs-var">noCafIdInfo</span></a></span><span>
</span><span id="line-467"></span><span>                </span><span class="annot"><span class="annottext">IdInfo -&gt; Arity -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setArityInfo"><span class="hs-operator hs-var">`setArityInfo`</span></a></span><span>          </span><span class="annot"><span class="annottext">Arity
</span><span class="hs-number">1</span></span><span>
</span><span id="line-468"></span><span>                </span><span class="annot"><span class="annottext">IdInfo -&gt; StrictSig -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setStrictnessInfo"><span class="hs-operator hs-var">`setStrictnessInfo`</span></a></span><span>     </span><span class="annot"><span class="annottext">StrictSig
</span><a href="#local-6989586621680829729"><span class="hs-identifier hs-var">strict_sig</span></a></span><span>
</span><span id="line-469"></span><span>                </span><span class="annot"><span class="annottext">IdInfo -&gt; CprSig -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setCprInfo"><span class="hs-operator hs-var">`setCprInfo`</span></a></span><span>            </span><span class="annot"><span class="annottext">CprSig
</span><a href="GHC.Types.Cpr.html#topCprSig"><span class="hs-identifier hs-var">topCprSig</span></a></span><span>
</span><span id="line-470"></span><span>                </span><span class="annot"><span class="annottext">IdInfo -&gt; Type -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setLevityInfoWithType"><span class="hs-operator hs-var">`setLevityInfoWithType`</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829768"><span class="hs-identifier hs-var">sel_ty</span></a></span><span>
</span><span id="line-471"></span><span>
</span><span id="line-472"></span><span>    </span><span id="local-6989586621680829767"><span class="annot"><span class="annottext">info :: IdInfo
</span><a href="#local-6989586621680829767"><span class="hs-identifier hs-var hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680829761"><span class="hs-identifier hs-var">new_tycon</span></a></span><span>
</span><span id="line-473"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680829733"><span class="hs-identifier hs-var">base_info</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; InlinePragma -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setInlinePragInfo"><span class="hs-operator hs-var">`setInlinePragInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">InlinePragma
</span><a href="GHC.Types.Basic.html#alwaysInlinePragma"><span class="hs-identifier hs-var">alwaysInlinePragma</span></a></span><span>
</span><span id="line-474"></span><span>                     </span><span class="annot"><span class="annottext">IdInfo -&gt; Unfolding -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setUnfoldingInfo"><span class="hs-operator hs-var">`setUnfoldingInfo`</span></a></span><span>  </span><span class="annot"><span class="annottext">Arity -&gt; CoreExpr -&gt; Unfolding
</span><a href="GHC.Core.Unfold.html#mkInlineUnfoldingWithArity"><span class="hs-identifier hs-var">mkInlineUnfoldingWithArity</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><span class="hs-number">1</span></span><span>
</span><span id="line-475"></span><span>                                           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Class -&gt; Arity -&gt; CoreExpr
</span><a href="GHC.Types.Id.Make.html#mkDictSelRhs"><span class="hs-identifier hs-var">mkDictSelRhs</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680829771"><span class="hs-identifier hs-var">clas</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829745"><span class="hs-identifier hs-var">val_index</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-476"></span><span>                   </span><span class="hs-comment">-- See Note [Single-method classes] in GHC.Tc.TyCl.Instance</span><span>
</span><span id="line-477"></span><span>                   </span><span class="hs-comment">-- for why alwaysInlinePragma</span><span>
</span><span id="line-478"></span><span>
</span><span id="line-479"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-480"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680829733"><span class="hs-identifier hs-var">base_info</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; RuleInfo -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setRuleInfo"><span class="hs-operator hs-var">`setRuleInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreRule] -&gt; RuleInfo
</span><a href="GHC.Core.FVs.html#mkRuleInfo"><span class="hs-identifier hs-var">mkRuleInfo</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CoreRule
</span><a href="#local-6989586621680829720"><span class="hs-identifier hs-var">rule</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-481"></span><span>                   </span><span class="hs-comment">-- Add a magic BuiltinRule, but no unfolding</span><span>
</span><span id="line-482"></span><span>                   </span><span class="hs-comment">-- so that the rule is always available to fire.</span><span>
</span><span id="line-483"></span><span>                   </span><span class="hs-comment">-- See Note [ClassOp/DFun selection] in GHC.Tc.TyCl.Instance</span><span>
</span><span id="line-484"></span><span>
</span><span id="line-485"></span><span>    </span><span class="hs-comment">-- This is the built-in rule that goes</span><span>
</span><span id="line-486"></span><span>    </span><span class="hs-comment">--      op (dfT d1 d2) ---&gt;  opT d1 d2</span><span>
</span><span id="line-487"></span><span>    </span><span id="local-6989586621680829720"><span class="annot"><span class="annottext">rule :: CoreRule
</span><a href="#local-6989586621680829720"><span class="hs-identifier hs-var hs-var">rule</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuiltinRule :: RuleName -&gt; Name -&gt; Arity -&gt; RuleFun -&gt; CoreRule
</span><a href="GHC.Core.html#BuiltinRule"><span class="hs-identifier hs-type">BuiltinRule</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ru_name :: RuleName
</span><a href="GHC.Core.html#ru_name"><span class="hs-identifier hs-var">ru_name</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; RuleName
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Class op &quot;</span></span><span> </span><span class="annot"><span class="annottext">RuleName -&gt; RuleName -&gt; RuleName
</span><a href="GHC.Data.FastString.html#appendFS"><span class="hs-operator hs-var">`appendFS`</span></a></span><span>
</span><span id="line-488"></span><span>                                     </span><span class="annot"><span class="annottext">OccName -&gt; RuleName
</span><a href="GHC.Types.Name.Occurrence.html#occNameFS"><span class="hs-identifier hs-var hs-var">occNameFS</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829772"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-489"></span><span>                       </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ru_fn :: Name
</span><a href="GHC.Core.html#ru_fn"><span class="hs-identifier hs-var">ru_fn</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829772"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-490"></span><span>                       </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ru_nargs :: Arity
</span><a href="GHC.Core.html#ru_nargs"><span class="hs-identifier hs-var">ru_nargs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829754"><span class="hs-identifier hs-var">n_ty_args</span></a></span><span> </span><span class="annot"><span class="annottext">Arity -&gt; Arity -&gt; Arity
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><span class="hs-number">1</span></span><span>
</span><span id="line-491"></span><span>                       </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ru_try :: RuleFun
</span><a href="GHC.Core.html#ru_try"><span class="hs-identifier hs-var">ru_try</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Arity -&gt; Arity -&gt; RuleFun
</span><a href="GHC.Types.Id.Make.html#dictSelRule"><span class="hs-identifier hs-var">dictSelRule</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829745"><span class="hs-identifier hs-var">val_index</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829754"><span class="hs-identifier hs-var">n_ty_args</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-492"></span><span>
</span><span id="line-493"></span><span>        </span><span class="hs-comment">-- The strictness signature is of the form U(AAAVAAAA) -&gt; T</span><span>
</span><span id="line-494"></span><span>        </span><span class="hs-comment">-- where the V depends on which item we are selecting</span><span>
</span><span id="line-495"></span><span>        </span><span class="hs-comment">-- It's worth giving one, so that absence info etc is generated</span><span>
</span><span id="line-496"></span><span>        </span><span class="hs-comment">-- even if the selector isn't inlined</span><span>
</span><span id="line-497"></span><span>
</span><span id="line-498"></span><span>    </span><span id="local-6989586621680829729"><span class="annot"><span class="annottext">strict_sig :: StrictSig
</span><a href="#local-6989586621680829729"><span class="hs-identifier hs-var hs-var">strict_sig</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Demand] -&gt; Divergence -&gt; StrictSig
</span><a href="GHC.Types.Demand.html#mkClosedStrictSig"><span class="hs-identifier hs-var">mkClosedStrictSig</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Demand
</span><a href="#local-6989586621680829703"><span class="hs-identifier hs-var">arg_dmd</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">Divergence
</span><a href="GHC.Types.Demand.html#topDiv"><span class="hs-identifier hs-var">topDiv</span></a></span><span>
</span><span id="line-499"></span><span>    </span><span id="local-6989586621680829703"><span class="annot"><span class="annottext">arg_dmd :: Demand
</span><a href="#local-6989586621680829703"><span class="hs-identifier hs-var hs-var">arg_dmd</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680829761"><span class="hs-identifier hs-var">new_tycon</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Demand
</span><a href="GHC.Types.Demand.html#evalDmd"><span class="hs-identifier hs-var">evalDmd</span></a></span><span>
</span><span id="line-500"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CleanDemand -&gt; Demand
</span><a href="GHC.Types.Demand.html#mkManyUsedDmd"><span class="hs-identifier hs-var">mkManyUsedDmd</span></a></span><span> </span><span class="annot"><span class="annottext">(CleanDemand -&gt; Demand) -&gt; CleanDemand -&gt; Demand
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-501"></span><span>                          </span><span class="annot"><span class="annottext">[Demand] -&gt; CleanDemand
</span><a href="GHC.Types.Demand.html#mkProdDmd"><span class="hs-identifier hs-var">mkProdDmd</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829772"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829697"><span class="hs-identifier hs-var">sel_name</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Demand
</span><a href="GHC.Types.Demand.html#evalDmd"><span class="hs-identifier hs-var">evalDmd</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Demand
</span><a href="GHC.Types.Demand.html#absDmd"><span class="hs-identifier hs-var">absDmd</span></a></span><span>
</span><span id="line-502"></span><span>                                    </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621680829697"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829697"><span class="hs-identifier hs-var">sel_name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680829764"><span class="hs-identifier hs-var">sel_names</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-503"></span><span>
</span><span id="line-504"></span><span class="annot"><a href="GHC.Types.Id.Make.html#mkDictSelRhs"><span class="hs-identifier hs-type">mkDictSelRhs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span>
</span><span id="line-505"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>         </span><span class="hs-comment">-- 0-indexed selector among (superclasses ++ methods)</span><span>
</span><span id="line-506"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-507"></span><span id="mkDictSelRhs"><span class="annot"><span class="annottext">mkDictSelRhs :: Class -&gt; Arity -&gt; CoreExpr
</span><a href="GHC.Types.Id.Make.html#mkDictSelRhs"><span class="hs-identifier hs-var hs-var">mkDictSelRhs</span></a></span></span><span> </span><span id="local-6989586621680829695"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680829695"><span class="hs-identifier hs-var">clas</span></a></span></span><span> </span><span id="local-6989586621680829694"><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829694"><span class="hs-identifier hs-var">val_index</span></a></span></span><span>
</span><span id="line-508"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; CoreExpr -&gt; CoreExpr
forall b. [b] -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#mkLams"><span class="hs-identifier hs-var">mkLams</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829692"><span class="hs-identifier hs-var">tyvars</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; CoreExpr -&gt; CoreExpr
forall b. b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#Lam"><span class="hs-identifier hs-var">Lam</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829690"><span class="hs-identifier hs-var">dict_id</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829689"><span class="hs-identifier hs-var">rhs_body</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-509"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-510"></span><span>    </span><span id="local-6989586621680829688"><span class="annot"><span class="annottext">tycon :: TyCon
</span><a href="#local-6989586621680829688"><span class="hs-identifier hs-var hs-var">tycon</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Class -&gt; TyCon
</span><a href="GHC.Core.Class.html#classTyCon"><span class="hs-identifier hs-var hs-var">classTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680829695"><span class="hs-identifier hs-var">clas</span></a></span><span>
</span><span id="line-511"></span><span>    </span><span id="local-6989586621680829687"><span class="annot"><span class="annottext">new_tycon :: Bool
</span><a href="#local-6989586621680829687"><span class="hs-identifier hs-var hs-var">new_tycon</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isNewTyCon"><span class="hs-identifier hs-var">isNewTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829688"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-512"></span><span>    </span><span class="hs-special">[</span><span id="local-6989586621680829686"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829686"><span class="hs-identifier hs-var">data_con</span></a></span></span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [DataCon]
</span><a href="GHC.Core.TyCon.html#tyConDataCons"><span class="hs-identifier hs-var">tyConDataCons</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829688"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-513"></span><span>    </span><span id="local-6989586621680829692"><span class="annot"><span class="annottext">tyvars :: [Var]
</span><a href="#local-6989586621680829692"><span class="hs-identifier hs-var hs-var">tyvars</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [Var]
</span><a href="GHC.Core.DataCon.html#dataConUnivTyVars"><span class="hs-identifier hs-var">dataConUnivTyVars</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829686"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-514"></span><span>    </span><span id="local-6989586621680829684"><span class="annot"><span class="annottext">arg_tys :: [Scaled Type]
</span><a href="#local-6989586621680829684"><span class="hs-identifier hs-var hs-var">arg_tys</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dataConRepArgTys"><span class="hs-identifier hs-var">dataConRepArgTys</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829686"><span class="hs-identifier hs-var">data_con</span></a></span><span>  </span><span class="hs-comment">-- Includes the dictionary superclasses</span><span>
</span><span id="line-515"></span><span>
</span><span id="line-516"></span><span>    </span><span id="local-6989586621680829681"><span class="annot"><span class="annottext">the_arg_id :: Var
</span><a href="#local-6989586621680829681"><span class="hs-identifier hs-var hs-var">the_arg_id</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; Arity -&gt; Var
forall a. Outputable a =&gt; [a] -&gt; Arity -&gt; a
</span><a href="GHC.Data.List.SetOps.html#getNth"><span class="hs-identifier hs-var">getNth</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829680"><span class="hs-identifier hs-var">arg_ids</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829694"><span class="hs-identifier hs-var">val_index</span></a></span><span>
</span><span id="line-517"></span><span>    </span><span id="local-6989586621680829679"><span class="annot"><span class="annottext">pred :: Type
</span><a href="#local-6989586621680829679"><span class="hs-identifier hs-var hs-var">pred</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Class -&gt; [Type] -&gt; Type
</span><a href="GHC.Core.Predicate.html#mkClassPred"><span class="hs-identifier hs-var">mkClassPred</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680829695"><span class="hs-identifier hs-var">clas</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Var] -&gt; [Type]
</span><a href="GHC.Core.TyCo.Rep.html#mkTyVarTys"><span class="hs-identifier hs-var">mkTyVarTys</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829692"><span class="hs-identifier hs-var">tyvars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-518"></span><span>    </span><span id="local-6989586621680829690"><span class="annot"><span class="annottext">dict_id :: Var
</span><a href="#local-6989586621680829690"><span class="hs-identifier hs-var hs-var">dict_id</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Arity -&gt; Type -&gt; Var
</span><a href="GHC.Types.Id.html#mkTemplateLocal"><span class="hs-identifier hs-var">mkTemplateLocal</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829679"><span class="hs-identifier hs-var">pred</span></a></span><span>
</span><span id="line-519"></span><span>    </span><span id="local-6989586621680829680"><span class="annot"><span class="annottext">arg_ids :: [Var]
</span><a href="#local-6989586621680829680"><span class="hs-identifier hs-var hs-var">arg_ids</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Arity -&gt; [Type] -&gt; [Var]
</span><a href="GHC.Types.Id.html#mkTemplateLocalsNum"><span class="hs-identifier hs-var">mkTemplateLocalsNum</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><span class="hs-number">2</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Scaled Type -&gt; Type) -&gt; [Scaled Type] -&gt; [Type]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Scaled Type -&gt; Type
forall a. Scaled a -&gt; a
</span><a href="GHC.Core.TyCo.Rep.html#scaledThing"><span class="hs-identifier hs-var">scaledThing</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680829684"><span class="hs-identifier hs-var">arg_tys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-520"></span><span>
</span><span id="line-521"></span><span>    </span><span id="local-6989586621680829689"><span class="annot"><span class="annottext">rhs_body :: CoreExpr
</span><a href="#local-6989586621680829689"><span class="hs-identifier hs-var hs-var">rhs_body</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680829687"><span class="hs-identifier hs-var">new_tycon</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [Type] -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Types.Id.Make.html#unwrapNewTypeBody"><span class="hs-identifier hs-var">unwrapNewTypeBody</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829688"><span class="hs-identifier hs-var">tycon</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Var] -&gt; [Type]
</span><a href="GHC.Core.TyCo.Rep.html#mkTyVarTys"><span class="hs-identifier hs-var">mkTyVarTys</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829692"><span class="hs-identifier hs-var">tyvars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-522"></span><span>                                                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; CoreExpr
forall b. Var -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829690"><span class="hs-identifier hs-var">dict_id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-523"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; Var -&gt; AltCon -&gt; [Var] -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Core.Utils.html#mkSingleAltCase"><span class="hs-identifier hs-var">mkSingleAltCase</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; CoreExpr
forall b. Var -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829690"><span class="hs-identifier hs-var">dict_id</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829690"><span class="hs-identifier hs-var">dict_id</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; AltCon
</span><a href="GHC.Core.html#DataAlt"><span class="hs-identifier hs-var">DataAlt</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829686"><span class="hs-identifier hs-var">data_con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-524"></span><span>                                           </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829680"><span class="hs-identifier hs-var">arg_ids</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; CoreExpr
forall b. Var -&gt; Expr b
</span><a href="GHC.Core.html#varToCoreExpr"><span class="hs-identifier hs-var">varToCoreExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829681"><span class="hs-identifier hs-var">the_arg_id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-525"></span><span>                                </span><span class="hs-comment">-- varToCoreExpr needed for equality superclass selectors</span><span>
</span><span id="line-526"></span><span>                                </span><span class="hs-comment">--   sel a b d = case x of { MkC _ (g:a~b) _ -&gt; CO g }</span><span>
</span><span id="line-527"></span><span>
</span><span id="line-528"></span><span class="annot"><a href="GHC.Types.Id.Make.html#dictSelRule"><span class="hs-identifier hs-type">dictSelRule</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#RuleFun"><span class="hs-identifier hs-type">RuleFun</span></a></span><span>
</span><span id="line-529"></span><span class="hs-comment">-- Tries to persuade the argument to look like a constructor</span><span>
</span><span id="line-530"></span><span class="hs-comment">-- application, using exprIsConApp_maybe, and then selects</span><span>
</span><span id="line-531"></span><span class="hs-comment">-- from it</span><span>
</span><span id="line-532"></span><span class="hs-comment">--       sel_i t1..tk (D t1..tk op1 ... opm) = opi</span><span>
</span><span id="line-533"></span><span class="hs-comment">--</span><span>
</span><span id="line-534"></span><span id="dictSelRule"><span class="annot"><span class="annottext">dictSelRule :: Arity -&gt; Arity -&gt; RuleFun
</span><a href="GHC.Types.Id.Make.html#dictSelRule"><span class="hs-identifier hs-var hs-var">dictSelRule</span></a></span></span><span> </span><span id="local-6989586621680829672"><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829672"><span class="hs-identifier hs-var">val_index</span></a></span></span><span> </span><span id="local-6989586621680829671"><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829671"><span class="hs-identifier hs-var">n_ty_args</span></a></span></span><span> </span><span class="annot"><span class="annottext">RuleOpts
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680829670"><span class="annot"><span class="annottext">InScopeEnv
</span><a href="#local-6989586621680829670"><span class="hs-identifier hs-var">id_unf</span></a></span></span><span> </span><span class="annot"><span class="annottext">Var
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680829669"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680829669"><span class="hs-identifier hs-var">args</span></a></span></span><span>
</span><span id="line-535"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680829668"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829668"><span class="hs-identifier hs-var">dict_arg</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Arity -&gt; [CoreExpr] -&gt; [CoreExpr]
forall a. Arity -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#drop"><span class="hs-identifier hs-var">drop</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829671"><span class="hs-identifier hs-var">n_ty_args</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680829669"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-536"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InScopeSet
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829666"><span class="annot"><span class="annottext">[FloatBind]
</span><a href="#local-6989586621680829666"><span class="hs-identifier hs-var">floats</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">DataCon
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829665"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680829665"><span class="hs-identifier hs-var">con_args</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">InScopeEnv
-&gt; CoreExpr
-&gt; Maybe (InScopeSet, [FloatBind], DataCon, [Type], [CoreExpr])
HasDebugCallStack =&gt;
InScopeEnv
-&gt; CoreExpr
-&gt; Maybe (InScopeSet, [FloatBind], DataCon, [Type], [CoreExpr])
</span><a href="GHC.Core.SimpleOpt.html#exprIsConApp_maybe"><span class="hs-identifier hs-var">exprIsConApp_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeEnv
</span><a href="#local-6989586621680829670"><span class="hs-identifier hs-var">id_unf</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829668"><span class="hs-identifier hs-var">dict_arg</span></a></span><span>
</span><span id="line-537"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; Maybe CoreExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FloatBind] -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Core.Make.html#wrapFloats"><span class="hs-identifier hs-var">wrapFloats</span></a></span><span> </span><span class="annot"><span class="annottext">[FloatBind]
</span><a href="#local-6989586621680829666"><span class="hs-identifier hs-var">floats</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr] -&gt; Arity -&gt; CoreExpr
forall a. Outputable a =&gt; [a] -&gt; Arity -&gt; a
</span><a href="GHC.Data.List.SetOps.html#getNth"><span class="hs-identifier hs-var">getNth</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621680829665"><span class="hs-identifier hs-var">con_args</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829672"><span class="hs-identifier hs-var">val_index</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-538"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-539"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe CoreExpr
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-540"></span><span>
</span><span id="line-541"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
        Data constructors
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-548"></span><span>
</span><span id="line-549"></span><span class="annot"><a href="GHC.Types.Id.Make.html#mkDataConWorkId"><span class="hs-identifier hs-type">mkDataConWorkId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-550"></span><span id="mkDataConWorkId"><span class="annot"><span class="annottext">mkDataConWorkId :: Name -&gt; DataCon -&gt; Var
</span><a href="GHC.Types.Id.Make.html#mkDataConWorkId"><span class="hs-identifier hs-var hs-var">mkDataConWorkId</span></a></span></span><span> </span><span id="local-6989586621680829662"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829662"><span class="hs-identifier hs-var">wkr_name</span></a></span></span><span> </span><span id="local-6989586621680829661"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829661"><span class="hs-identifier hs-var">data_con</span></a></span></span><span>
</span><span id="line-551"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isNewTyCon"><span class="hs-identifier hs-var">isNewTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829660"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-552"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdDetails -&gt; Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.html#mkGlobalId"><span class="hs-identifier hs-var">mkGlobalId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; IdDetails
</span><a href="GHC.Types.Id.Info.html#DataConWrapId"><span class="hs-identifier hs-var">DataConWrapId</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829661"><span class="hs-identifier hs-var">data_con</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829662"><span class="hs-identifier hs-var">wkr_name</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829658"><span class="hs-identifier hs-var">wkr_ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680829657"><span class="hs-identifier hs-var">nt_work_info</span></a></span><span>
</span><span id="line-553"></span><span>      </span><span class="hs-comment">-- See Note [Newtype workers]</span><span>
</span><span id="line-554"></span><span>
</span><span id="line-555"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-556"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdDetails -&gt; Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.html#mkGlobalId"><span class="hs-identifier hs-var">mkGlobalId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; IdDetails
</span><a href="GHC.Types.Id.Info.html#DataConWorkId"><span class="hs-identifier hs-var">DataConWorkId</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829661"><span class="hs-identifier hs-var">data_con</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829662"><span class="hs-identifier hs-var">wkr_name</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829658"><span class="hs-identifier hs-var">wkr_ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680829655"><span class="hs-identifier hs-var">alg_wkr_info</span></a></span><span>
</span><span id="line-557"></span><span>
</span><span id="line-558"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-559"></span><span>    </span><span id="local-6989586621680829660"><span class="annot"><span class="annottext">tycon :: TyCon
</span><a href="#local-6989586621680829660"><span class="hs-identifier hs-var hs-var">tycon</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dataConTyCon"><span class="hs-identifier hs-var">dataConTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829661"><span class="hs-identifier hs-var">data_con</span></a></span><span>  </span><span class="hs-comment">-- The representation TyCon</span><span>
</span><span id="line-560"></span><span>    </span><span id="local-6989586621680829658"><span class="annot"><span class="annottext">wkr_ty :: Type
</span><a href="#local-6989586621680829658"><span class="hs-identifier hs-var hs-var">wkr_ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Type
</span><a href="GHC.Core.DataCon.html#dataConRepType"><span class="hs-identifier hs-var">dataConRepType</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829661"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-561"></span><span>
</span><span id="line-562"></span><span>    </span><span class="hs-comment">----------- Workers for data types --------------</span><span>
</span><span id="line-563"></span><span>    </span><span id="local-6989586621680829655"><span class="annot"><span class="annottext">alg_wkr_info :: IdInfo
</span><a href="#local-6989586621680829655"><span class="hs-identifier hs-var hs-var">alg_wkr_info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#noCafIdInfo"><span class="hs-identifier hs-var">noCafIdInfo</span></a></span><span>
</span><span id="line-564"></span><span>                   </span><span class="annot"><span class="annottext">IdInfo -&gt; Arity -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setArityInfo"><span class="hs-operator hs-var">`setArityInfo`</span></a></span><span>          </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829652"><span class="hs-identifier hs-var">wkr_arity</span></a></span><span>
</span><span id="line-565"></span><span>                   </span><span class="annot"><span class="annottext">IdInfo -&gt; CprSig -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setCprInfo"><span class="hs-operator hs-var">`setCprInfo`</span></a></span><span>            </span><span class="annot"><span class="annottext">Arity -&gt; CprResult -&gt; CprSig
</span><a href="GHC.Types.Cpr.html#mkCprSig"><span class="hs-identifier hs-var">mkCprSig</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829652"><span class="hs-identifier hs-var">wkr_arity</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; CprResult
</span><a href="GHC.Types.Id.Make.html#dataConCPR"><span class="hs-identifier hs-var">dataConCPR</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829661"><span class="hs-identifier hs-var">data_con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-566"></span><span>                   </span><span class="annot"><span class="annottext">IdInfo -&gt; InlinePragma -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setInlinePragInfo"><span class="hs-operator hs-var">`setInlinePragInfo`</span></a></span><span>     </span><span class="annot"><span class="annottext">InlinePragma
</span><a href="#local-6989586621680829649"><span class="hs-identifier hs-var">wkr_inline_prag</span></a></span><span>
</span><span id="line-567"></span><span>                   </span><span class="annot"><span class="annottext">IdInfo -&gt; Unfolding -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setUnfoldingInfo"><span class="hs-operator hs-var">`setUnfoldingInfo`</span></a></span><span>      </span><span class="annot"><span class="annottext">Unfolding
</span><a href="GHC.Core.html#evaldUnfolding"><span class="hs-identifier hs-var">evaldUnfolding</span></a></span><span>  </span><span class="hs-comment">-- Record that it's evaluated,</span><span>
</span><span id="line-568"></span><span>                                                           </span><span class="hs-comment">-- even if arity = 0</span><span>
</span><span id="line-569"></span><span>                   </span><span class="annot"><span class="annottext">IdInfo -&gt; Type -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setLevityInfoWithType"><span class="hs-operator hs-var">`setLevityInfoWithType`</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829658"><span class="hs-identifier hs-var">wkr_ty</span></a></span><span>
</span><span id="line-570"></span><span>                     </span><span class="hs-comment">-- NB: unboxed tuples have workers, so we can't use</span><span>
</span><span id="line-571"></span><span>                     </span><span class="hs-comment">-- setNeverLevPoly</span><span>
</span><span id="line-572"></span><span>
</span><span id="line-573"></span><span>    </span><span id="local-6989586621680829649"><span class="annot"><span class="annottext">wkr_inline_prag :: InlinePragma
</span><a href="#local-6989586621680829649"><span class="hs-identifier hs-var hs-var">wkr_inline_prag</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InlinePragma
</span><a href="GHC.Types.Basic.html#defaultInlinePragma"><span class="hs-identifier hs-var">defaultInlinePragma</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">inl_rule :: RuleMatchInfo
</span><a href="GHC.Types.Basic.html#inl_rule"><span class="hs-identifier hs-var">inl_rule</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RuleMatchInfo
</span><a href="GHC.Types.Basic.html#ConLike"><span class="hs-identifier hs-var">ConLike</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-574"></span><span>    </span><span id="local-6989586621680829652"><span class="annot"><span class="annottext">wkr_arity :: Arity
</span><a href="#local-6989586621680829652"><span class="hs-identifier hs-var hs-var">wkr_arity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Arity
</span><a href="GHC.Core.DataCon.html#dataConRepArity"><span class="hs-identifier hs-var">dataConRepArity</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829661"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-575"></span><span>    </span><span class="hs-comment">----------- Workers for newtypes --------------</span><span>
</span><span id="line-576"></span><span>    </span><span id="local-6989586621680829643"><span class="annot"><span class="annottext">univ_tvs :: [Var]
</span><a href="#local-6989586621680829643"><span class="hs-identifier hs-var hs-var">univ_tvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [Var]
</span><a href="GHC.Core.DataCon.html#dataConUnivTyVars"><span class="hs-identifier hs-var">dataConUnivTyVars</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829661"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-577"></span><span>    </span><span id="local-6989586621680829642"><span class="annot"><span class="annottext">arg_tys :: [Scaled Type]
</span><a href="#local-6989586621680829642"><span class="hs-identifier hs-var hs-var">arg_tys</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dataConRepArgTys"><span class="hs-identifier hs-var">dataConRepArgTys</span></a></span><span>  </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829661"><span class="hs-identifier hs-var">data_con</span></a></span><span>  </span><span class="hs-comment">-- Should be same as dataConOrigArgTys</span><span>
</span><span id="line-578"></span><span>    </span><span id="local-6989586621680829657"><span class="annot"><span class="annottext">nt_work_info :: IdInfo
</span><a href="#local-6989586621680829657"><span class="hs-identifier hs-var hs-var">nt_work_info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#noCafIdInfo"><span class="hs-identifier hs-var">noCafIdInfo</span></a></span><span>          </span><span class="hs-comment">-- The NoCaf-ness is set by noCafIdInfo</span><span>
</span><span id="line-579"></span><span>                  </span><span class="annot"><span class="annottext">IdInfo -&gt; Arity -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setArityInfo"><span class="hs-operator hs-var">`setArityInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><span class="hs-number">1</span></span><span>      </span><span class="hs-comment">-- Arity 1</span><span>
</span><span id="line-580"></span><span>                  </span><span class="annot"><span class="annottext">IdInfo -&gt; InlinePragma -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setInlinePragInfo"><span class="hs-operator hs-var">`setInlinePragInfo`</span></a></span><span>     </span><span class="annot"><span class="annottext">InlinePragma
</span><a href="GHC.Types.Id.Make.html#dataConWrapperInlinePragma"><span class="hs-identifier hs-var">dataConWrapperInlinePragma</span></a></span><span>
</span><span id="line-581"></span><span>                  </span><span class="annot"><span class="annottext">IdInfo -&gt; Unfolding -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setUnfoldingInfo"><span class="hs-operator hs-var">`setUnfoldingInfo`</span></a></span><span>      </span><span class="annot"><span class="annottext">Unfolding
</span><a href="#local-6989586621680829640"><span class="hs-identifier hs-var">newtype_unf</span></a></span><span>
</span><span id="line-582"></span><span>                  </span><span class="annot"><span class="annottext">IdInfo -&gt; Type -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setLevityInfoWithType"><span class="hs-operator hs-var">`setLevityInfoWithType`</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829658"><span class="hs-identifier hs-var">wkr_ty</span></a></span><span>
</span><span id="line-583"></span><span>    </span><span id="local-6989586621680829639"><span class="annot"><span class="annottext">id_arg1 :: Var
</span><a href="#local-6989586621680829639"><span class="hs-identifier hs-var hs-var">id_arg1</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Arity -&gt; Scaled Type -&gt; Var
</span><a href="GHC.Types.Id.html#mkScaledTemplateLocal"><span class="hs-identifier hs-var">mkScaledTemplateLocal</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><span class="hs-number">1</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Scaled Type] -&gt; Scaled Type
forall a. [a] -&gt; a
</span><a href="../../base/src/GHC.List.html#head"><span class="hs-identifier hs-var">head</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680829642"><span class="hs-identifier hs-var">arg_tys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-584"></span><span>    </span><span id="local-6989586621680829636"><span class="annot"><span class="annottext">res_ty_args :: [Type]
</span><a href="#local-6989586621680829636"><span class="hs-identifier hs-var hs-var">res_ty_args</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; [Type]
</span><a href="GHC.Core.TyCo.Rep.html#mkTyCoVarTys"><span class="hs-identifier hs-var">mkTyCoVarTys</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829643"><span class="hs-identifier hs-var">univ_tvs</span></a></span><span>
</span><span id="line-585"></span><span>    </span><span id="local-6989586621680829640"><span class="annot"><span class="annottext">newtype_unf :: Unfolding
</span><a href="#local-6989586621680829640"><span class="hs-identifier hs-var hs-var">newtype_unf</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT2</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isVanillaDataCon</span><span> </span><span class="hs-identifier">data_con</span><span> </span><span class="hs-operator">&amp;&amp;</span><span>
</span><span id="line-586"></span><span>                            </span><span class="hs-identifier">isSingleton</span><span> </span><span class="hs-identifier">arg_tys</span><span>
</span><span id="line-587"></span><span>                          </span><span class="hs-special">,</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">data_con</span><span>  </span><span class="hs-special">)</span><span>
</span><span id="line-588"></span><span>                              </span><span class="hs-comment">-- Note [Newtype datacons]</span><span>
</span><span id="line-589"></span><span>                   </span><span class="annot"><span class="annottext">CoreExpr -&gt; Unfolding
</span><a href="GHC.Core.Unfold.html#mkCompulsoryUnfolding"><span class="hs-identifier hs-var">mkCompulsoryUnfolding</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; Unfolding) -&gt; CoreExpr -&gt; Unfolding
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-590"></span><span>                   </span><span class="annot"><span class="annottext">[Var] -&gt; CoreExpr -&gt; CoreExpr
forall b. [b] -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#mkLams"><span class="hs-identifier hs-var">mkLams</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829643"><span class="hs-identifier hs-var">univ_tvs</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; CoreExpr -&gt; CoreExpr
forall b. b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#Lam"><span class="hs-identifier hs-var">Lam</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829639"><span class="hs-identifier hs-var">id_arg1</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-591"></span><span>                   </span><span class="annot"><span class="annottext">TyCon -&gt; [Type] -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Types.Id.Make.html#wrapNewTypeBody"><span class="hs-identifier hs-var">wrapNewTypeBody</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829660"><span class="hs-identifier hs-var">tycon</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829636"><span class="hs-identifier hs-var">res_ty_args</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; CoreExpr
forall b. Var -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829639"><span class="hs-identifier hs-var">id_arg1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-592"></span><span>
</span><span id="line-593"></span><span class="annot"><a href="GHC.Types.Id.Make.html#dataConCPR"><span class="hs-identifier hs-type">dataConCPR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Cpr.html#CprResult"><span class="hs-identifier hs-type">CprResult</span></a></span><span>
</span><span id="line-594"></span><span id="dataConCPR"><span class="annot"><span class="annottext">dataConCPR :: DataCon -&gt; CprResult
</span><a href="GHC.Types.Id.Make.html#dataConCPR"><span class="hs-identifier hs-var hs-var">dataConCPR</span></a></span></span><span> </span><span id="local-6989586621680829621"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829621"><span class="hs-identifier hs-var">con</span></a></span></span><span>
</span><span id="line-595"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isDataTyCon"><span class="hs-identifier hs-var">isDataTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829619"><span class="hs-identifier hs-var">tycon</span></a></span><span>     </span><span class="hs-comment">-- Real data types only; that is,</span><span>
</span><span id="line-596"></span><span>                          </span><span class="hs-comment">-- not unboxed tuples or newtypes</span><span>
</span><span id="line-597"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; [Var]
</span><a href="GHC.Core.DataCon.html#dataConExTyCoVars"><span class="hs-identifier hs-var">dataConExTyCoVars</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829621"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-comment">-- No existentials</span><span>
</span><span id="line-598"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829616"><span class="hs-identifier hs-var">wkr_arity</span></a></span><span> </span><span class="annot"><span class="annottext">Arity -&gt; Arity -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">Arity
</span><span class="hs-number">0</span></span><span>
</span><span id="line-599"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829616"><span class="hs-identifier hs-var">wkr_arity</span></a></span><span> </span><span class="annot"><span class="annottext">Arity -&gt; Arity -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829613"><span class="hs-identifier hs-var">mAX_CPR_SIZE</span></a></span><span>
</span><span id="line-600"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Arity -&gt; CprResult
</span><a href="GHC.Types.Cpr.html#conCpr"><span class="hs-identifier hs-var">conCpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; Arity
</span><a href="GHC.Core.DataCon.html#dataConTag"><span class="hs-identifier hs-var">dataConTag</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829621"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-601"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-602"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CprResult
</span><a href="GHC.Types.Cpr.html#topCpr"><span class="hs-identifier hs-var">topCpr</span></a></span><span>
</span><span id="line-603"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-604"></span><span>    </span><span id="local-6989586621680829619"><span class="annot"><span class="annottext">tycon :: TyCon
</span><a href="#local-6989586621680829619"><span class="hs-identifier hs-var hs-var">tycon</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dataConTyCon"><span class="hs-identifier hs-var">dataConTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829621"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-605"></span><span>    </span><span id="local-6989586621680829616"><span class="annot"><span class="annottext">wkr_arity :: Arity
</span><a href="#local-6989586621680829616"><span class="hs-identifier hs-var hs-var">wkr_arity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Arity
</span><a href="GHC.Core.DataCon.html#dataConRepArity"><span class="hs-identifier hs-var">dataConRepArity</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829621"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-606"></span><span>
</span><span id="line-607"></span><span>    </span><span class="annot"><a href="#local-6989586621680829613"><span class="hs-identifier hs-type">mAX_CPR_SIZE</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#Arity"><span class="hs-identifier hs-type">Arity</span></a></span><span>
</span><span id="line-608"></span><span>    </span><span id="local-6989586621680829613"><span class="annot"><span class="annottext">mAX_CPR_SIZE :: Arity
</span><a href="#local-6989586621680829613"><span class="hs-identifier hs-var hs-var">mAX_CPR_SIZE</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Arity
</span><span class="hs-number">10</span></span><span>
</span><span id="line-609"></span><span>    </span><span class="hs-comment">-- We do not treat very big tuples as CPR-ish:</span><span>
</span><span id="line-610"></span><span>    </span><span class="hs-comment">--      a) for a start we get into trouble because there aren't</span><span>
</span><span id="line-611"></span><span>    </span><span class="hs-comment">--         &quot;enough&quot; unboxed tuple types (a tiresome restriction,</span><span>
</span><span id="line-612"></span><span>    </span><span class="hs-comment">--         but hard to fix),</span><span>
</span><span id="line-613"></span><span>    </span><span class="hs-comment">--      b) more importantly, big unboxed tuples get returned mainly</span><span>
</span><span id="line-614"></span><span>    </span><span class="hs-comment">--         on the stack, and are often then allocated in the heap</span><span>
</span><span id="line-615"></span><span>    </span><span class="hs-comment">--         by the caller.  So doing CPR for them may in fact make</span><span>
</span><span id="line-616"></span><span>    </span><span class="hs-comment">--         things worse.</span><span>
</span><span id="line-617"></span><span>
</span><span id="line-618"></span><span class="hs-comment">{-
-------------------------------------------------
--         Data constructor representation
--
-- This is where we decide how to wrap/unwrap the
-- constructor fields
--
--------------------------------------------------
-}</span><span>
</span><span id="line-627"></span><span>
</span><span id="line-628"></span><span class="hs-keyword">type</span><span> </span><span id="Unboxer"><span class="annot"><a href="GHC.Types.Id.Make.html#Unboxer"><span class="hs-identifier hs-var">Unboxer</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSM"><span class="hs-identifier hs-type">UniqSM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-629"></span><span>  </span><span class="hs-comment">-- Unbox: bind rep vars by decomposing src var</span><span>
</span><span id="line-630"></span><span>
</span><span id="line-631"></span><span class="hs-keyword">data</span><span> </span><span id="Boxer"><span class="annot"><a href="GHC.Types.Id.Make.html#Boxer"><span class="hs-identifier hs-var">Boxer</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="UnitBox"><span class="annot"><a href="GHC.Types.Id.Make.html#UnitBox"><span class="hs-identifier hs-var">UnitBox</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="Boxer"><span class="annot"><a href="GHC.Types.Id.Make.html#Boxer"><span class="hs-identifier hs-var">Boxer</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Subst.html#TCvSubst"><span class="hs-identifier hs-type">TCvSubst</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSM"><span class="hs-identifier hs-type">UniqSM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-632"></span><span>  </span><span class="hs-comment">-- Box:   build src arg using these rep vars</span><span>
</span><span id="line-633"></span><span>
</span><span id="line-634"></span><span class="hs-comment">-- | Data Constructor Boxer</span><span>
</span><span id="line-635"></span><span class="hs-keyword">newtype</span><span> </span><span id="DataConBoxer"><span class="annot"><a href="GHC.Types.Id.Make.html#DataConBoxer"><span class="hs-identifier hs-var">DataConBoxer</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="DCB"><span class="annot"><a href="GHC.Types.Id.Make.html#DCB"><span class="hs-identifier hs-var">DCB</span></a></span></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSM"><span class="hs-identifier hs-type">UniqSM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.html#CoreBind"><span class="hs-identifier hs-type">CoreBind</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-636"></span><span>                       </span><span class="hs-comment">-- Bind these src-level vars, returning the</span><span>
</span><span id="line-637"></span><span>                       </span><span class="hs-comment">-- rep-level vars to bind in the pattern</span><span>
</span><span id="line-638"></span><span>
</span><span id="line-639"></span><span class="annot"><a href="GHC.Types.Id.Make.html#vanillaDataConBoxer"><span class="hs-identifier hs-type">vanillaDataConBoxer</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#DataConBoxer"><span class="hs-identifier hs-type">DataConBoxer</span></a></span><span>
</span><span id="line-640"></span><span class="hs-comment">-- No transformation on arguments needed</span><span>
</span><span id="line-641"></span><span id="vanillaDataConBoxer"><span class="annot"><span class="annottext">vanillaDataConBoxer :: DataConBoxer
</span><a href="GHC.Types.Id.Make.html#vanillaDataConBoxer"><span class="hs-identifier hs-var hs-var">vanillaDataConBoxer</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([Type] -&gt; [Var] -&gt; UniqSM ([Var], [CoreBind])) -&gt; DataConBoxer
</span><a href="GHC.Types.Id.Make.html#DCB"><span class="hs-identifier hs-var">DCB</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680829606"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829606"><span class="hs-identifier hs-var">_tys</span></a></span></span><span> </span><span id="local-6989586621680829605"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829605"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">([Var], [CoreBind]) -&gt; UniqSM ([Var], [CoreBind])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829605"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-642"></span><span>
</span><span id="line-643"></span><span class="hs-comment">{-
Note [Inline partially-applied constructor wrappers]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

We allow the wrapper to inline when partially applied to avoid
boxing values unnecessarily. For example, consider

   data Foo a = Foo !Int a

   instance Traversable Foo where
     traverse f (Foo i a) = Foo i &lt;$&gt; f a

This desugars to

   traverse f foo = case foo of
        Foo i# a -&gt; let i = I# i#
                    in map ($WFoo i) (f a)

If the wrapper `$WFoo` is not inlined, we get a fruitless reboxing of `i`.
But if we inline the wrapper, we get

   map (\a. case i of I# i# a -&gt; Foo i# a) (f a)

and now case-of-known-constructor eliminates the redundant allocation.

-}</span><span>
</span><span id="line-669"></span><span>
</span><span id="line-670"></span><span class="annot"><a href="GHC.Types.Id.Make.html#mkDataConRep"><span class="hs-identifier hs-type">mkDataConRep</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span>
</span><span id="line-671"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.FamInstEnv.html#FamInstEnvs"><span class="hs-identifier hs-type">FamInstEnvs</span></a></span><span>
</span><span id="line-672"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-673"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.DataCon.html#HsImplBang"><span class="hs-identifier hs-type">HsImplBang</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-674"></span><span>                </span><span class="hs-comment">-- See Note [Bangs on imported data constructors]</span><span>
</span><span id="line-675"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span>
</span><span id="line-676"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSM"><span class="hs-identifier hs-type">UniqSM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataConRep"><span class="hs-identifier hs-type">DataConRep</span></a></span><span>
</span><span id="line-677"></span><span id="mkDataConRep"><span class="annot"><span class="annottext">mkDataConRep :: DynFlags
-&gt; FamInstEnvs
-&gt; Name
-&gt; Maybe [HsImplBang]
-&gt; DataCon
-&gt; UniqSM DataConRep
</span><a href="GHC.Types.Id.Make.html#mkDataConRep"><span class="hs-identifier hs-var hs-var">mkDataConRep</span></a></span></span><span> </span><span id="local-6989586621680829604"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680829604"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680829603"><span class="annot"><span class="annottext">FamInstEnvs
</span><a href="#local-6989586621680829603"><span class="hs-identifier hs-var">fam_envs</span></a></span></span><span> </span><span id="local-6989586621680829602"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829602"><span class="hs-identifier hs-var">wrap_name</span></a></span></span><span> </span><span id="local-6989586621680829601"><span class="annot"><span class="annottext">Maybe [HsImplBang]
</span><a href="#local-6989586621680829601"><span class="hs-identifier hs-var">mb_bangs</span></a></span></span><span> </span><span id="local-6989586621680829600"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829600"><span class="hs-identifier hs-var">data_con</span></a></span></span><span>
</span><span id="line-678"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680829599"><span class="hs-identifier hs-var">wrapper_reqd</span></a></span><span>
</span><span id="line-679"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataConRep -&gt; UniqSM DataConRep
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">DataConRep
</span><a href="GHC.Core.DataCon.html#NoDataConRep"><span class="hs-identifier hs-var">NoDataConRep</span></a></span><span>
</span><span id="line-680"></span><span>
</span><span id="line-681"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-682"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621680829597"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829597"><span class="hs-identifier hs-var">wrap_args</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Scaled Type -&gt; UniqSM Var) -&gt; [Scaled Type] -&gt; UniqSM [Var]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">Scaled Type -&gt; UniqSM Var
</span><a href="GHC.Types.Id.Make.html#newLocal"><span class="hs-identifier hs-var">newLocal</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680829594"><span class="hs-identifier hs-var">wrap_arg_tys</span></a></span><span>
</span><span id="line-683"></span><span>       </span><span class="hs-special">;</span><span> </span><span id="local-6989586621680829593"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829593"><span class="hs-identifier hs-var">wrap_body</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(Var, Unboxer)] -&gt; CoreExpr -&gt; UniqSM CoreExpr
</span><a href="#local-6989586621680829592"><span class="hs-identifier hs-var">mk_rep_app</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829597"><span class="hs-identifier hs-var">wrap_args</span></a></span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; [Unboxer] -&gt; [(Var, Unboxer)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-operator hs-var">`zip`</span></a></span><span> </span><span class="annot"><span class="annottext">[EqSpec] -&gt; [Unboxer] -&gt; [Unboxer]
forall b a. [b] -&gt; [a] -&gt; [a]
</span><a href="GHC.Utils.Misc.html#dropList"><span class="hs-identifier hs-var">dropList</span></a></span><span> </span><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680829590"><span class="hs-identifier hs-var">eq_spec</span></a></span><span> </span><span class="annot"><span class="annottext">[Unboxer]
</span><a href="#local-6989586621680829589"><span class="hs-identifier hs-var">unboxers</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-684"></span><span>                                 </span><span class="annot"><span class="annottext">CoreExpr
forall {b}. Expr b
</span><a href="#local-6989586621680829588"><span class="hs-identifier hs-var">initial_wrap_app</span></a></span><span>
</span><span id="line-685"></span><span>
</span><span id="line-686"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680829587"><span class="annot"><span class="annottext">wrap_id :: Var
</span><a href="#local-6989586621680829587"><span class="hs-identifier hs-var hs-var">wrap_id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdDetails -&gt; Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.html#mkGlobalId"><span class="hs-identifier hs-var">mkGlobalId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; IdDetails
</span><a href="GHC.Types.Id.Info.html#DataConWrapId"><span class="hs-identifier hs-var">DataConWrapId</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829600"><span class="hs-identifier hs-var">data_con</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829602"><span class="hs-identifier hs-var">wrap_name</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829586"><span class="hs-identifier hs-var">wrap_ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680829585"><span class="hs-identifier hs-var">wrap_info</span></a></span><span>
</span><span id="line-687"></span><span>             </span><span id="local-6989586621680829585"><span class="annot"><span class="annottext">wrap_info :: IdInfo
</span><a href="#local-6989586621680829585"><span class="hs-identifier hs-var hs-var">wrap_info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#noCafIdInfo"><span class="hs-identifier hs-var">noCafIdInfo</span></a></span><span>
</span><span id="line-688"></span><span>                         </span><span class="annot"><span class="annottext">IdInfo -&gt; Arity -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setArityInfo"><span class="hs-operator hs-var">`setArityInfo`</span></a></span><span>         </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829584"><span class="hs-identifier hs-var">wrap_arity</span></a></span><span>
</span><span id="line-689"></span><span>                             </span><span class="hs-comment">-- It's important to specify the arity, so that partial</span><span>
</span><span id="line-690"></span><span>                             </span><span class="hs-comment">-- applications are treated as values</span><span>
</span><span id="line-691"></span><span>                         </span><span class="annot"><span class="annottext">IdInfo -&gt; InlinePragma -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setInlinePragInfo"><span class="hs-operator hs-var">`setInlinePragInfo`</span></a></span><span>    </span><span class="annot"><span class="annottext">InlinePragma
</span><a href="#local-6989586621680829583"><span class="hs-identifier hs-var">wrap_prag</span></a></span><span>
</span><span id="line-692"></span><span>                         </span><span class="annot"><span class="annottext">IdInfo -&gt; Unfolding -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setUnfoldingInfo"><span class="hs-operator hs-var">`setUnfoldingInfo`</span></a></span><span>     </span><span class="annot"><span class="annottext">Unfolding
</span><a href="#local-6989586621680829582"><span class="hs-identifier hs-var">wrap_unf</span></a></span><span>
</span><span id="line-693"></span><span>                         </span><span class="annot"><span class="annottext">IdInfo -&gt; StrictSig -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setStrictnessInfo"><span class="hs-operator hs-var">`setStrictnessInfo`</span></a></span><span>    </span><span class="annot"><span class="annottext">StrictSig
</span><a href="#local-6989586621680829581"><span class="hs-identifier hs-var">wrap_sig</span></a></span><span>
</span><span id="line-694"></span><span>                         </span><span class="annot"><span class="annottext">IdInfo -&gt; CprSig -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setCprInfo"><span class="hs-operator hs-var">`setCprInfo`</span></a></span><span>           </span><span class="annot"><span class="annottext">Arity -&gt; CprResult -&gt; CprSig
</span><a href="GHC.Types.Cpr.html#mkCprSig"><span class="hs-identifier hs-var">mkCprSig</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829584"><span class="hs-identifier hs-var">wrap_arity</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; CprResult
</span><a href="GHC.Types.Id.Make.html#dataConCPR"><span class="hs-identifier hs-var">dataConCPR</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829600"><span class="hs-identifier hs-var">data_con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-695"></span><span>                             </span><span class="hs-comment">-- We need to get the CAF info right here because GHC.Iface.Tidy</span><span>
</span><span id="line-696"></span><span>                             </span><span class="hs-comment">-- does not tidy the IdInfo of implicit bindings (like the wrapper)</span><span>
</span><span id="line-697"></span><span>                             </span><span class="hs-comment">-- so it not make sure that the CAF info is sane</span><span>
</span><span id="line-698"></span><span>                         </span><span class="annot"><span class="annottext">IdInfo -&gt; Type -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setLevityInfoWithType"><span class="hs-operator hs-var">`setLevityInfoWithType`</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829586"><span class="hs-identifier hs-var">wrap_ty</span></a></span><span>
</span><span id="line-699"></span><span>
</span><span id="line-700"></span><span>             </span><span id="local-6989586621680829581"><span class="annot"><span class="annottext">wrap_sig :: StrictSig
</span><a href="#local-6989586621680829581"><span class="hs-identifier hs-var hs-var">wrap_sig</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Demand] -&gt; Divergence -&gt; StrictSig
</span><a href="GHC.Types.Demand.html#mkClosedStrictSig"><span class="hs-identifier hs-var">mkClosedStrictSig</span></a></span><span> </span><span class="annot"><span class="annottext">[Demand]
</span><a href="#local-6989586621680829580"><span class="hs-identifier hs-var">wrap_arg_dmds</span></a></span><span> </span><span class="annot"><span class="annottext">Divergence
</span><a href="GHC.Types.Demand.html#topDiv"><span class="hs-identifier hs-var">topDiv</span></a></span><span>
</span><span id="line-701"></span><span>
</span><span id="line-702"></span><span>             </span><span id="local-6989586621680829580"><span class="annot"><span class="annottext">wrap_arg_dmds :: [Demand]
</span><a href="#local-6989586621680829580"><span class="hs-identifier hs-var hs-var">wrap_arg_dmds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-703"></span><span>               </span><span class="annot"><span class="annottext">Arity -&gt; Demand -&gt; [Demand]
forall a. Arity -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Type] -&gt; Arity
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Arity
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829577"><span class="hs-identifier hs-var">theta</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Demand
</span><a href="GHC.Types.Demand.html#topDmd"><span class="hs-identifier hs-var">topDmd</span></a></span><span> </span><span class="annot"><span class="annottext">[Demand] -&gt; [Demand] -&gt; [Demand]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(HsImplBang -&gt; Demand) -&gt; [HsImplBang] -&gt; [Demand]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">HsImplBang -&gt; Demand
</span><a href="#local-6989586621680829575"><span class="hs-identifier hs-var">mk_dmd</span></a></span><span> </span><span class="annot"><span class="annottext">[HsImplBang]
</span><a href="#local-6989586621680829574"><span class="hs-identifier hs-var">arg_ibangs</span></a></span><span>
</span><span id="line-704"></span><span>               </span><span class="hs-comment">-- Don't forget the dictionary arguments when building</span><span>
</span><span id="line-705"></span><span>               </span><span class="hs-comment">-- the strictness signature (#14290).</span><span>
</span><span id="line-706"></span><span>
</span><span id="line-707"></span><span>             </span><span id="local-6989586621680829575"><span class="annot"><span class="annottext">mk_dmd :: HsImplBang -&gt; Demand
</span><a href="#local-6989586621680829575"><span class="hs-identifier hs-var hs-var">mk_dmd</span></a></span></span><span> </span><span id="local-6989586621680829573"><span class="annot"><span class="annottext">HsImplBang
</span><a href="#local-6989586621680829573"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">HsImplBang -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isBanged"><span class="hs-identifier hs-var">isBanged</span></a></span><span> </span><span class="annot"><span class="annottext">HsImplBang
</span><a href="#local-6989586621680829573"><span class="hs-identifier hs-var">str</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Demand
</span><a href="GHC.Types.Demand.html#evalDmd"><span class="hs-identifier hs-var">evalDmd</span></a></span><span>
</span><span id="line-708"></span><span>                        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Demand
</span><a href="GHC.Types.Demand.html#topDmd"><span class="hs-identifier hs-var">topDmd</span></a></span><span>
</span><span id="line-709"></span><span>
</span><span id="line-710"></span><span>             </span><span id="local-6989586621680829583"><span class="annot"><span class="annottext">wrap_prag :: InlinePragma
</span><a href="#local-6989586621680829583"><span class="hs-identifier hs-var hs-var">wrap_prag</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InlinePragma
</span><a href="GHC.Types.Id.Make.html#dataConWrapperInlinePragma"><span class="hs-identifier hs-var">dataConWrapperInlinePragma</span></a></span><span>
</span><span id="line-711"></span><span>                         </span><span class="annot"><span class="annottext">InlinePragma -&gt; Activation -&gt; InlinePragma
</span><a href="GHC.Types.Basic.html#setInlinePragmaActivation"><span class="hs-operator hs-var">`setInlinePragmaActivation`</span></a></span><span> </span><span class="annot"><span class="annottext">Activation
</span><a href="GHC.Types.Basic.html#activateDuringFinal"><span class="hs-identifier hs-var">activateDuringFinal</span></a></span><span>
</span><span id="line-712"></span><span>                         </span><span class="hs-comment">-- See Note [Activation for data constructor wrappers]</span><span>
</span><span id="line-713"></span><span>
</span><span id="line-714"></span><span>             </span><span class="hs-comment">-- The wrapper will usually be inlined (see wrap_unf), so its</span><span>
</span><span id="line-715"></span><span>             </span><span class="hs-comment">-- strictness and CPR info is usually irrelevant. But this is</span><span>
</span><span id="line-716"></span><span>             </span><span class="hs-comment">-- not always the case; GHC may choose not to inline it. In</span><span>
</span><span id="line-717"></span><span>             </span><span class="hs-comment">-- particular, the wrapper constructor is not inlined inside</span><span>
</span><span id="line-718"></span><span>             </span><span class="hs-comment">-- an INLINE rhs or when it is not applied to any arguments.</span><span>
</span><span id="line-719"></span><span>             </span><span class="hs-comment">-- See Note [Inline partially-applied constructor wrappers]</span><span>
</span><span id="line-720"></span><span>             </span><span class="hs-comment">-- Passing Nothing here allows the wrapper to inline when</span><span>
</span><span id="line-721"></span><span>             </span><span class="hs-comment">-- unsaturated.</span><span>
</span><span id="line-722"></span><span>             </span><span id="local-6989586621680829582"><span class="annot"><span class="annottext">wrap_unf :: Unfolding
</span><a href="#local-6989586621680829582"><span class="hs-identifier hs-var hs-var">wrap_unf</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isNewTyCon"><span class="hs-identifier hs-var">isNewTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829569"><span class="hs-identifier hs-var">tycon</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; Unfolding
</span><a href="GHC.Core.Unfold.html#mkCompulsoryUnfolding"><span class="hs-identifier hs-var">mkCompulsoryUnfolding</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829568"><span class="hs-identifier hs-var">wrap_rhs</span></a></span><span>
</span><span id="line-723"></span><span>                        </span><span class="hs-comment">-- See Note [Compulsory newtype unfolding]</span><span>
</span><span id="line-724"></span><span>                      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; Unfolding
</span><a href="GHC.Core.Unfold.html#mkInlineUnfolding"><span class="hs-identifier hs-var">mkInlineUnfolding</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829568"><span class="hs-identifier hs-var">wrap_rhs</span></a></span><span>
</span><span id="line-725"></span><span>             </span><span id="local-6989586621680829568"><span class="annot"><span class="annottext">wrap_rhs :: CoreExpr
</span><a href="#local-6989586621680829568"><span class="hs-identifier hs-var hs-var">wrap_rhs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; CoreExpr -&gt; CoreExpr
forall b. [b] -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#mkLams"><span class="hs-identifier hs-var">mkLams</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829566"><span class="hs-identifier hs-var">wrap_tvs</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-726"></span><span>                        </span><span class="annot"><span class="annottext">[Var] -&gt; CoreExpr -&gt; CoreExpr
forall b. [b] -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#mkLams"><span class="hs-identifier hs-var">mkLams</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829597"><span class="hs-identifier hs-var">wrap_args</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-727"></span><span>                        </span><span class="annot"><span class="annottext">TyCon -&gt; [Type] -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Types.Id.Make.html#wrapFamInstBody"><span class="hs-identifier hs-var">wrapFamInstBody</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829569"><span class="hs-identifier hs-var">tycon</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829565"><span class="hs-identifier hs-var">res_ty_args</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-728"></span><span>                        </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829593"><span class="hs-identifier hs-var">wrap_body</span></a></span><span>
</span><span id="line-729"></span><span>
</span><span id="line-730"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">DataConRep -&gt; UniqSM DataConRep
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DCR :: Var
-&gt; DataConBoxer
-&gt; [Scaled Type]
-&gt; [StrictnessMark]
-&gt; [HsImplBang]
-&gt; DataConRep
</span><a href="GHC.Core.DataCon.html#DCR"><span class="hs-identifier hs-type">DCR</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">dcr_wrap_id :: Var
</span><a href="GHC.Core.DataCon.html#dcr_wrap_id"><span class="hs-identifier hs-var">dcr_wrap_id</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829587"><span class="hs-identifier hs-var">wrap_id</span></a></span><span>
</span><span id="line-731"></span><span>                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcr_boxer :: DataConBoxer
</span><a href="GHC.Core.DataCon.html#dcr_boxer"><span class="hs-identifier hs-var">dcr_boxer</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Boxer] -&gt; DataConBoxer
</span><a href="#local-6989586621680829561"><span class="hs-identifier hs-var">mk_boxer</span></a></span><span> </span><span class="annot"><span class="annottext">[Boxer]
</span><a href="#local-6989586621680829560"><span class="hs-identifier hs-var">boxers</span></a></span><span>
</span><span id="line-732"></span><span>                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcr_arg_tys :: [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dcr_arg_tys"><span class="hs-identifier hs-var">dcr_arg_tys</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680829558"><span class="hs-identifier hs-var">rep_tys</span></a></span><span>
</span><span id="line-733"></span><span>                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcr_stricts :: [StrictnessMark]
</span><a href="GHC.Core.DataCon.html#dcr_stricts"><span class="hs-identifier hs-var">dcr_stricts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[StrictnessMark]
</span><a href="#local-6989586621680829556"><span class="hs-identifier hs-var">rep_strs</span></a></span><span>
</span><span id="line-734"></span><span>                       </span><span class="hs-comment">-- For newtypes, dcr_bangs is always [HsLazy].</span><span>
</span><span id="line-735"></span><span>                       </span><span class="hs-comment">-- See Note [HsImplBangs for newtypes].</span><span>
</span><span id="line-736"></span><span>                     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">dcr_bangs :: [HsImplBang]
</span><a href="GHC.Core.DataCon.html#dcr_bangs"><span class="hs-identifier hs-var">dcr_bangs</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[HsImplBang]
</span><a href="#local-6989586621680829574"><span class="hs-identifier hs-var">arg_ibangs</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-737"></span><span>
</span><span id="line-738"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-739"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680829554"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829554"><span class="hs-identifier hs-var">univ_tvs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829553"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829553"><span class="hs-identifier hs-var">ex_tvs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829590"><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680829590"><span class="hs-identifier hs-var">eq_spec</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829577"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829577"><span class="hs-identifier hs-var">theta</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829552"><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680829552"><span class="hs-identifier hs-var">orig_arg_tys</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829551"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829551"><span class="hs-identifier hs-var">_orig_res_ty</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-740"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; ([Var], [Var], [EqSpec], [Type], [Scaled Type], Type)
</span><a href="GHC.Core.DataCon.html#dataConFullSig"><span class="hs-identifier hs-var">dataConFullSig</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829600"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-741"></span><span>    </span><span id="local-6989586621680829566"><span class="annot"><span class="annottext">wrap_tvs :: [Var]
</span><a href="#local-6989586621680829566"><span class="hs-identifier hs-var hs-var">wrap_tvs</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [Var]
</span><a href="GHC.Core.DataCon.html#dataConUserTyVars"><span class="hs-identifier hs-var">dataConUserTyVars</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829600"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-742"></span><span>    </span><span id="local-6989586621680829565"><span class="annot"><span class="annottext">res_ty_args :: [Type]
</span><a href="#local-6989586621680829565"><span class="hs-identifier hs-var hs-var">res_ty_args</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TCvSubst -&gt; [Var] -&gt; [Type]
</span><a href="GHC.Core.TyCo.Subst.html#substTyVars"><span class="hs-identifier hs-var">substTyVars</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[(Var, Type)] -&gt; TCvSubst
</span><a href="GHC.Core.TyCo.Subst.html#mkTvSubstPrs"><span class="hs-identifier hs-var">mkTvSubstPrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(EqSpec -&gt; (Var, Type)) -&gt; [EqSpec] -&gt; [(Var, Type)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">EqSpec -&gt; (Var, Type)
</span><a href="GHC.Core.DataCon.html#eqSpecPair"><span class="hs-identifier hs-var">eqSpecPair</span></a></span><span> </span><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680829590"><span class="hs-identifier hs-var">eq_spec</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829554"><span class="hs-identifier hs-var">univ_tvs</span></a></span><span>
</span><span id="line-743"></span><span>
</span><span id="line-744"></span><span>    </span><span id="local-6989586621680829569"><span class="annot"><span class="annottext">tycon :: TyCon
</span><a href="#local-6989586621680829569"><span class="hs-identifier hs-var hs-var">tycon</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; TyCon
</span><a href="GHC.Core.DataCon.html#dataConTyCon"><span class="hs-identifier hs-var">dataConTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829600"><span class="hs-identifier hs-var">data_con</span></a></span><span>       </span><span class="hs-comment">-- The representation TyCon (not family)</span><span>
</span><span id="line-745"></span><span>    </span><span id="local-6989586621680829586"><span class="annot"><span class="annottext">wrap_ty :: Type
</span><a href="#local-6989586621680829586"><span class="hs-identifier hs-var hs-var">wrap_ty</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Type
</span><a href="GHC.Core.DataCon.html#dataConWrapperType"><span class="hs-identifier hs-var">dataConWrapperType</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829600"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-746"></span><span>    </span><span id="local-6989586621680829544"><span class="annot"><span class="annottext">ev_tys :: [Type]
</span><a href="#local-6989586621680829544"><span class="hs-identifier hs-var hs-var">ev_tys</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[EqSpec] -&gt; [Type]
</span><a href="GHC.Core.DataCon.html#eqSpecPreds"><span class="hs-identifier hs-var">eqSpecPreds</span></a></span><span> </span><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680829590"><span class="hs-identifier hs-var">eq_spec</span></a></span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; [Type] -&gt; [Type]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829577"><span class="hs-identifier hs-var">theta</span></a></span><span>
</span><span id="line-747"></span><span>    </span><span id="local-6989586621680829542"><span class="annot"><span class="annottext">all_arg_tys :: [Scaled Type]
</span><a href="#local-6989586621680829542"><span class="hs-identifier hs-var hs-var">all_arg_tys</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Scaled Type) -&gt; [Type] -&gt; [Scaled Type]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; Scaled Type
forall a. a -&gt; Scaled a
</span><a href="GHC.Core.Type.html#unrestricted"><span class="hs-identifier hs-var">unrestricted</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829544"><span class="hs-identifier hs-var">ev_tys</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type] -&gt; [Scaled Type] -&gt; [Scaled Type]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680829552"><span class="hs-identifier hs-var">orig_arg_tys</span></a></span><span>
</span><span id="line-748"></span><span>    </span><span id="local-6989586621680829540"><span class="annot"><span class="annottext">ev_ibangs :: [HsImplBang]
</span><a href="#local-6989586621680829540"><span class="hs-identifier hs-var hs-var">ev_ibangs</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Type -&gt; HsImplBang) -&gt; [Type] -&gt; [HsImplBang]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsImplBang -&gt; Type -&gt; HsImplBang
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">HsImplBang
</span><a href="GHC.Core.DataCon.html#HsLazy"><span class="hs-identifier hs-var">HsLazy</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829544"><span class="hs-identifier hs-var">ev_tys</span></a></span><span>
</span><span id="line-749"></span><span>    </span><span id="local-6989586621680829537"><span class="annot"><span class="annottext">orig_bangs :: [HsSrcBang]
</span><a href="#local-6989586621680829537"><span class="hs-identifier hs-var hs-var">orig_bangs</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [HsSrcBang]
</span><a href="GHC.Core.DataCon.html#dataConSrcBangs"><span class="hs-identifier hs-var">dataConSrcBangs</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829600"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-750"></span><span>
</span><span id="line-751"></span><span>    </span><span id="local-6989586621680829594"><span class="annot"><span class="annottext">wrap_arg_tys :: [Scaled Type]
</span><a href="#local-6989586621680829594"><span class="hs-identifier hs-var hs-var">wrap_arg_tys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Type -&gt; Scaled Type) -&gt; [Type] -&gt; [Scaled Type]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; Scaled Type
forall a. a -&gt; Scaled a
</span><a href="GHC.Core.Type.html#unrestricted"><span class="hs-identifier hs-var">unrestricted</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829577"><span class="hs-identifier hs-var">theta</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Scaled Type] -&gt; [Scaled Type] -&gt; [Scaled Type]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680829552"><span class="hs-identifier hs-var">orig_arg_tys</span></a></span><span>
</span><span id="line-752"></span><span>    </span><span id="local-6989586621680829584"><span class="annot"><span class="annottext">wrap_arity :: Arity
</span><a href="#local-6989586621680829584"><span class="hs-identifier hs-var hs-var">wrap_arity</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Var -&gt; Bool) -&gt; [Var] -&gt; Arity
forall a. (a -&gt; Bool) -&gt; [a] -&gt; Arity
</span><a href="GHC.Utils.Misc.html#count"><span class="hs-identifier hs-var">count</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; Bool
</span><a href="GHC.Types.Var.html#isCoVar"><span class="hs-identifier hs-var">isCoVar</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829553"><span class="hs-identifier hs-var">ex_tvs</span></a></span><span> </span><span class="annot"><span class="annottext">Arity -&gt; Arity -&gt; Arity
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type] -&gt; Arity
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Arity
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680829594"><span class="hs-identifier hs-var">wrap_arg_tys</span></a></span><span>
</span><span id="line-753"></span><span>             </span><span class="hs-comment">-- The wrap_args are the arguments *other than* the eq_spec</span><span>
</span><span id="line-754"></span><span>             </span><span class="hs-comment">-- Because we are going to apply the eq_spec args manually in the</span><span>
</span><span id="line-755"></span><span>             </span><span class="hs-comment">-- wrapper</span><span>
</span><span id="line-756"></span><span>
</span><span id="line-757"></span><span>    </span><span id="local-6989586621680829531"><span class="annot"><span class="annottext">new_tycon :: Bool
</span><a href="#local-6989586621680829531"><span class="hs-identifier hs-var hs-var">new_tycon</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isNewTyCon"><span class="hs-identifier hs-var">isNewTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829569"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-758"></span><span>    </span><span id="local-6989586621680829574"><span class="annot"><span class="annottext">arg_ibangs :: [HsImplBang]
</span><a href="#local-6989586621680829574"><span class="hs-identifier hs-var hs-var">arg_ibangs</span></a></span></span><span>
</span><span id="line-759"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680829531"><span class="hs-identifier hs-var">new_tycon</span></a></span><span>
</span><span id="line-760"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Scaled Type -&gt; HsImplBang) -&gt; [Scaled Type] -&gt; [HsImplBang]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsImplBang -&gt; Scaled Type -&gt; HsImplBang
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">HsImplBang
</span><a href="GHC.Core.DataCon.html#HsLazy"><span class="hs-identifier hs-var">HsLazy</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680829552"><span class="hs-identifier hs-var">orig_arg_tys</span></a></span><span> </span><span class="hs-comment">-- See Note [HsImplBangs for newtypes]</span><span>
</span><span id="line-761"></span><span>                                        </span><span class="hs-comment">-- orig_arg_tys should be a singleton, but</span><span>
</span><span id="line-762"></span><span>                                        </span><span class="hs-comment">-- if a user declared a wrong newtype we</span><span>
</span><span id="line-763"></span><span>                                        </span><span class="hs-comment">-- detect this later (see test T2334A)</span><span>
</span><span id="line-764"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-765"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe [HsImplBang]
</span><a href="#local-6989586621680829601"><span class="hs-identifier hs-var">mb_bangs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-766"></span><span>          </span><span class="annot"><span class="annottext">Maybe [HsImplBang]
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(Scaled Type -&gt; HsSrcBang -&gt; HsImplBang)
-&gt; [Scaled Type] -&gt; [HsSrcBang] -&gt; [HsImplBang]
forall a b c. (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]
</span><a href="../../base/src/GHC.List.html#zipWith"><span class="hs-identifier hs-var">zipWith</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; FamInstEnvs -&gt; Scaled Type -&gt; HsSrcBang -&gt; HsImplBang
</span><a href="GHC.Types.Id.Make.html#dataConSrcToImplBang"><span class="hs-identifier hs-var">dataConSrcToImplBang</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680829604"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FamInstEnvs
</span><a href="#local-6989586621680829603"><span class="hs-identifier hs-var">fam_envs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-767"></span><span>                                </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680829552"><span class="hs-identifier hs-var">orig_arg_tys</span></a></span><span> </span><span class="annot"><span class="annottext">[HsSrcBang]
</span><a href="#local-6989586621680829537"><span class="hs-identifier hs-var">orig_bangs</span></a></span><span>
</span><span id="line-768"></span><span>          </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680829528"><span class="annot"><span class="annottext">[HsImplBang]
</span><a href="#local-6989586621680829528"><span class="hs-identifier hs-var">bangs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[HsImplBang]
</span><a href="#local-6989586621680829528"><span class="hs-identifier hs-var">bangs</span></a></span><span>
</span><span id="line-769"></span><span>
</span><span id="line-770"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680829527"><span class="annot"><span class="annottext">[[(Scaled Type, StrictnessMark)]]
</span><a href="#local-6989586621680829527"><span class="hs-identifier hs-var">rep_tys_w_strs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829526"><span class="annot"><span class="annottext">[(Unboxer, Boxer)]
</span><a href="#local-6989586621680829526"><span class="hs-identifier hs-var">wrappers</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-771"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[([(Scaled Type, StrictnessMark)], (Unboxer, Boxer))]
-&gt; ([[(Scaled Type, StrictnessMark)]], [(Unboxer, Boxer)])
forall a b. [(a, b)] -&gt; ([a], [b])
</span><a href="../../base/src/GHC.List.html#unzip"><span class="hs-identifier hs-var">unzip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Scaled Type
 -&gt; HsImplBang
 -&gt; ([(Scaled Type, StrictnessMark)], (Unboxer, Boxer)))
-&gt; [Scaled Type]
-&gt; [HsImplBang]
-&gt; [([(Scaled Type, StrictnessMark)], (Unboxer, Boxer))]
forall a b c. (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]
</span><a href="../../base/src/GHC.List.html#zipWith"><span class="hs-identifier hs-var">zipWith</span></a></span><span> </span><span class="annot"><span class="annottext">Scaled Type
-&gt; HsImplBang
-&gt; ([(Scaled Type, StrictnessMark)], (Unboxer, Boxer))
</span><a href="GHC.Types.Id.Make.html#dataConArgRep"><span class="hs-identifier hs-var">dataConArgRep</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680829542"><span class="hs-identifier hs-var">all_arg_tys</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[HsImplBang]
</span><a href="#local-6989586621680829540"><span class="hs-identifier hs-var">ev_ibangs</span></a></span><span> </span><span class="annot"><span class="annottext">[HsImplBang] -&gt; [HsImplBang] -&gt; [HsImplBang]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[HsImplBang]
</span><a href="#local-6989586621680829574"><span class="hs-identifier hs-var">arg_ibangs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-772"></span><span>
</span><span id="line-773"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680829589"><span class="annot"><span class="annottext">[Unboxer]
</span><a href="#local-6989586621680829589"><span class="hs-identifier hs-var">unboxers</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829560"><span class="annot"><span class="annottext">[Boxer]
</span><a href="#local-6989586621680829560"><span class="hs-identifier hs-var">boxers</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Unboxer, Boxer)] -&gt; ([Unboxer], [Boxer])
forall a b. [(a, b)] -&gt; ([a], [b])
</span><a href="../../base/src/GHC.List.html#unzip"><span class="hs-identifier hs-var">unzip</span></a></span><span> </span><span class="annot"><span class="annottext">[(Unboxer, Boxer)]
</span><a href="#local-6989586621680829526"><span class="hs-identifier hs-var">wrappers</span></a></span><span>
</span><span id="line-774"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680829558"><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680829558"><span class="hs-identifier hs-var">rep_tys</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829556"><span class="annot"><span class="annottext">[StrictnessMark]
</span><a href="#local-6989586621680829556"><span class="hs-identifier hs-var">rep_strs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Scaled Type, StrictnessMark)]
-&gt; ([Scaled Type], [StrictnessMark])
forall a b. [(a, b)] -&gt; ([a], [b])
</span><a href="../../base/src/GHC.List.html#unzip"><span class="hs-identifier hs-var">unzip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[[(Scaled Type, StrictnessMark)]]
-&gt; [(Scaled Type, StrictnessMark)]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="annot"><span class="annottext">[[(Scaled Type, StrictnessMark)]]
</span><a href="#local-6989586621680829527"><span class="hs-identifier hs-var">rep_tys_w_strs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-775"></span><span>
</span><span id="line-776"></span><span>    </span><span id="local-6989586621680829599"><span class="annot"><span class="annottext">wrapper_reqd :: Bool
</span><a href="#local-6989586621680829599"><span class="hs-identifier hs-var hs-var">wrapper_reqd</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-777"></span><span>        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680829531"><span class="hs-identifier hs-var">new_tycon</span></a></span><span>
</span><span id="line-778"></span><span>                     </span><span class="hs-comment">-- (Most) newtypes have only a worker, with the exception</span><span>
</span><span id="line-779"></span><span>                     </span><span class="hs-comment">-- of some newtypes written with GADT syntax. See below.</span><span>
</span><span id="line-780"></span><span>         </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(HsImplBang -&gt; Bool) -&gt; [HsImplBang] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#any"><span class="hs-identifier hs-var">any</span></a></span><span> </span><span class="annot"><span class="annottext">HsImplBang -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isBanged"><span class="hs-identifier hs-var">isBanged</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[HsImplBang]
</span><a href="#local-6989586621680829540"><span class="hs-identifier hs-var">ev_ibangs</span></a></span><span> </span><span class="annot"><span class="annottext">[HsImplBang] -&gt; [HsImplBang] -&gt; [HsImplBang]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[HsImplBang]
</span><a href="#local-6989586621680829574"><span class="hs-identifier hs-var">arg_ibangs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-781"></span><span>                     </span><span class="hs-comment">-- Some forcing/unboxing (includes eq_spec)</span><span>
</span><span id="line-782"></span><span>             </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; Bool -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[EqSpec] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680829590"><span class="hs-identifier hs-var">eq_spec</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- GADT</span><span>
</span><span id="line-783"></span><span>      </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isFamInstTyCon"><span class="hs-identifier hs-var">isFamInstTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829569"><span class="hs-identifier hs-var">tycon</span></a></span><span> </span><span class="hs-comment">-- Cast result</span><span>
</span><span id="line-784"></span><span>      </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#dataConUserTyVarsArePermuted"><span class="hs-identifier hs-var">dataConUserTyVarsArePermuted</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829600"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-785"></span><span>                     </span><span class="hs-comment">-- If the data type was written with GADT syntax and</span><span>
</span><span id="line-786"></span><span>                     </span><span class="hs-comment">-- orders the type variables differently from what the</span><span>
</span><span id="line-787"></span><span>                     </span><span class="hs-comment">-- worker expects, it needs a data con wrapper to reorder</span><span>
</span><span id="line-788"></span><span>                     </span><span class="hs-comment">-- the type variables.</span><span>
</span><span id="line-789"></span><span>                     </span><span class="hs-comment">-- See Note [Data con wrappers and GADT syntax].</span><span>
</span><span id="line-790"></span><span>
</span><span id="line-791"></span><span>    </span><span id="local-6989586621680829588"><span class="annot"><span class="annottext">initial_wrap_app :: Expr b
</span><a href="#local-6989586621680829588"><span class="hs-identifier hs-var hs-var">initial_wrap_app</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var -&gt; Expr b
forall b. Var -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; Var
</span><a href="GHC.Core.DataCon.html#dataConWorkId"><span class="hs-identifier hs-var">dataConWorkId</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829600"><span class="hs-identifier hs-var">data_con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-792"></span><span>                       </span><span class="annot"><span class="annottext">Expr b -&gt; [Type] -&gt; Expr b
forall b. Expr b -&gt; [Type] -&gt; Expr b
</span><a href="GHC.Core.html#mkTyApps"><span class="hs-operator hs-var">`mkTyApps`</span></a></span><span>  </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829565"><span class="hs-identifier hs-var">res_ty_args</span></a></span><span>
</span><span id="line-793"></span><span>                       </span><span class="annot"><span class="annottext">Expr b -&gt; [Var] -&gt; Expr b
forall b. Expr b -&gt; [Var] -&gt; Expr b
</span><a href="GHC.Core.html#mkVarApps"><span class="hs-operator hs-var">`mkVarApps`</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829553"><span class="hs-identifier hs-var">ex_tvs</span></a></span><span>
</span><span id="line-794"></span><span>                       </span><span class="annot"><span class="annottext">Expr b -&gt; [Coercion] -&gt; Expr b
forall b. Expr b -&gt; [Coercion] -&gt; Expr b
</span><a href="GHC.Core.html#mkCoApps"><span class="hs-operator hs-var">`mkCoApps`</span></a></span><span>  </span><span class="annot"><span class="annottext">(EqSpec -&gt; Coercion) -&gt; [EqSpec] -&gt; [Coercion]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Role -&gt; Type -&gt; Coercion
</span><a href="GHC.Core.Coercion.html#mkReflCo"><span class="hs-identifier hs-var">mkReflCo</span></a></span><span> </span><span class="annot"><span class="annottext">Role
</span><a href="GHC.Core.Coercion.Axiom.html#Nominal"><span class="hs-identifier hs-var">Nominal</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Coercion) -&gt; (EqSpec -&gt; Type) -&gt; EqSpec -&gt; Coercion
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">EqSpec -&gt; Type
</span><a href="GHC.Core.DataCon.html#eqSpecType"><span class="hs-identifier hs-var">eqSpecType</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621680829590"><span class="hs-identifier hs-var">eq_spec</span></a></span><span>
</span><span id="line-795"></span><span>
</span><span id="line-796"></span><span>    </span><span class="annot"><a href="#local-6989586621680829561"><span class="hs-identifier hs-type">mk_boxer</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Id.Make.html#Boxer"><span class="hs-identifier hs-type">Boxer</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#DataConBoxer"><span class="hs-identifier hs-type">DataConBoxer</span></a></span><span>
</span><span id="line-797"></span><span>    </span><span id="local-6989586621680829561"><span class="annot"><span class="annottext">mk_boxer :: [Boxer] -&gt; DataConBoxer
</span><a href="#local-6989586621680829561"><span class="hs-identifier hs-var hs-var">mk_boxer</span></a></span></span><span> </span><span id="local-6989586621680829507"><span class="annot"><span class="annottext">[Boxer]
</span><a href="#local-6989586621680829507"><span class="hs-identifier hs-var">boxers</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([Type] -&gt; [Var] -&gt; UniqSM ([Var], [CoreBind])) -&gt; DataConBoxer
</span><a href="GHC.Types.Id.Make.html#DCB"><span class="hs-identifier hs-var">DCB</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621680829506"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829506"><span class="hs-identifier hs-var">ty_args</span></a></span></span><span> </span><span id="local-6989586621680829505"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829505"><span class="hs-identifier hs-var">src_vars</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-798"></span><span>                      </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680829504"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829504"><span class="hs-identifier hs-var">ex_vars</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829503"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829503"><span class="hs-identifier hs-var">term_vars</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; [Var] -&gt; ([Var], [Var])
forall b a. [b] -&gt; [a] -&gt; ([a], [a])
</span><a href="GHC.Utils.Misc.html#splitAtList"><span class="hs-identifier hs-var">splitAtList</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829553"><span class="hs-identifier hs-var">ex_tvs</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829505"><span class="hs-identifier hs-var">src_vars</span></a></span><span>
</span><span id="line-799"></span><span>                               </span><span id="local-6989586621680829500"><span class="annot"><span class="annottext">subst1 :: TCvSubst
</span><a href="#local-6989586621680829500"><span class="hs-identifier hs-var hs-var">subst1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; [Type] -&gt; TCvSubst
HasDebugCallStack =&gt; [Var] -&gt; [Type] -&gt; TCvSubst
</span><a href="GHC.Core.TyCo.Subst.html#zipTvSubst"><span class="hs-identifier hs-var">zipTvSubst</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829554"><span class="hs-identifier hs-var">univ_tvs</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829506"><span class="hs-identifier hs-var">ty_args</span></a></span><span>
</span><span id="line-800"></span><span>                               </span><span id="local-6989586621680829498"><span class="annot"><span class="annottext">subst2 :: TCvSubst
</span><a href="#local-6989586621680829498"><span class="hs-identifier hs-var hs-var">subst2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TCvSubst -&gt; [Var] -&gt; [Type] -&gt; TCvSubst
</span><a href="GHC.Core.TyCo.Subst.html#extendTCvSubstList"><span class="hs-identifier hs-var">extendTCvSubstList</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680829500"><span class="hs-identifier hs-var">subst1</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829553"><span class="hs-identifier hs-var">ex_tvs</span></a></span><span>
</span><span id="line-801"></span><span>                                                           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Var] -&gt; [Type]
</span><a href="GHC.Core.TyCo.Rep.html#mkTyCoVarTys"><span class="hs-identifier hs-var">mkTyCoVarTys</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829504"><span class="hs-identifier hs-var">ex_vars</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-802"></span><span>                         </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680829496"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829496"><span class="hs-identifier hs-var">rep_ids</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829495"><span class="annot"><span class="annottext">[CoreBind]
</span><a href="#local-6989586621680829495"><span class="hs-identifier hs-var">binds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TCvSubst -&gt; [Boxer] -&gt; [Var] -&gt; UniqSM ([Var], [CoreBind])
</span><a href="#local-6989586621680829494"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680829498"><span class="hs-identifier hs-var">subst2</span></a></span><span> </span><span class="annot"><span class="annottext">[Boxer]
</span><a href="#local-6989586621680829507"><span class="hs-identifier hs-var">boxers</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829503"><span class="hs-identifier hs-var">term_vars</span></a></span><span>
</span><span id="line-803"></span><span>                         </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">([Var], [CoreBind]) -&gt; UniqSM ([Var], [CoreBind])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829504"><span class="hs-identifier hs-var">ex_vars</span></a></span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; [Var] -&gt; [Var]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829496"><span class="hs-identifier hs-var">rep_ids</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[CoreBind]
</span><a href="#local-6989586621680829495"><span class="hs-identifier hs-var">binds</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-804"></span><span>
</span><span id="line-805"></span><span>    </span><span id="local-6989586621680829494"><span class="annot"><span class="annottext">go :: TCvSubst -&gt; [Boxer] -&gt; [Var] -&gt; UniqSM ([Var], [CoreBind])
</span><a href="#local-6989586621680829494"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621680829480"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829480"><span class="hs-identifier hs-var">src_vars</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT2</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">null</span><span> </span><span class="hs-identifier">src_vars</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">data_con</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-identifier">return</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-806"></span><span>    </span><span class="annot"><a href="#local-6989586621680829494"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621680829479"><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680829479"><span class="hs-identifier hs-var">subst</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Boxer
</span><a href="GHC.Types.Id.Make.html#UnitBox"><span class="hs-identifier hs-var">UnitBox</span></a></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680829478"><span class="annot"><span class="annottext">[Boxer]
</span><a href="#local-6989586621680829478"><span class="hs-identifier hs-var">boxers</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680829477"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829477"><span class="hs-identifier hs-var">src_var</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680829476"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829476"><span class="hs-identifier hs-var">src_vars</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-807"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680829475"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829475"><span class="hs-identifier hs-var">rep_ids2</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829474"><span class="annot"><span class="annottext">[CoreBind]
</span><a href="#local-6989586621680829474"><span class="hs-identifier hs-var">binds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TCvSubst -&gt; [Boxer] -&gt; [Var] -&gt; UniqSM ([Var], [CoreBind])
</span><a href="#local-6989586621680829494"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680829479"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">[Boxer]
</span><a href="#local-6989586621680829478"><span class="hs-identifier hs-var">boxers</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829476"><span class="hs-identifier hs-var">src_vars</span></a></span><span>
</span><span id="line-808"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">([Var], [CoreBind]) -&gt; UniqSM ([Var], [CoreBind])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829477"><span class="hs-identifier hs-var">src_var</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; [Var] -&gt; [Var]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829475"><span class="hs-identifier hs-var">rep_ids2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[CoreBind]
</span><a href="#local-6989586621680829474"><span class="hs-identifier hs-var">binds</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-809"></span><span>    </span><span class="annot"><a href="#local-6989586621680829494"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621680829473"><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680829473"><span class="hs-identifier hs-var">subst</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Id.Make.html#Boxer"><span class="hs-identifier hs-type">Boxer</span></a></span><span> </span><span id="local-6989586621680829472"><span class="annot"><span class="annottext">TCvSubst -&gt; UniqSM ([Var], CoreExpr)
</span><a href="#local-6989586621680829472"><span class="hs-identifier hs-var">boxer</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680829471"><span class="annot"><span class="annottext">[Boxer]
</span><a href="#local-6989586621680829471"><span class="hs-identifier hs-var">boxers</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680829470"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829470"><span class="hs-identifier hs-var">src_var</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680829469"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829469"><span class="hs-identifier hs-var">src_vars</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-810"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680829468"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829468"><span class="hs-identifier hs-var">rep_ids1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829467"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829467"><span class="hs-identifier hs-var">arg</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TCvSubst -&gt; UniqSM ([Var], CoreExpr)
</span><a href="#local-6989586621680829472"><span class="hs-identifier hs-var">boxer</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680829473"><span class="hs-identifier hs-var">subst</span></a></span><span>
</span><span id="line-811"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680829466"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829466"><span class="hs-identifier hs-var">rep_ids2</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829465"><span class="annot"><span class="annottext">[CoreBind]
</span><a href="#local-6989586621680829465"><span class="hs-identifier hs-var">binds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TCvSubst -&gt; [Boxer] -&gt; [Var] -&gt; UniqSM ([Var], [CoreBind])
</span><a href="#local-6989586621680829494"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680829473"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">[Boxer]
</span><a href="#local-6989586621680829471"><span class="hs-identifier hs-var">boxers</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829469"><span class="hs-identifier hs-var">src_vars</span></a></span><span>
</span><span id="line-812"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">([Var], [CoreBind]) -&gt; UniqSM ([Var], [CoreBind])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829468"><span class="hs-identifier hs-var">rep_ids1</span></a></span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; [Var] -&gt; [Var]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829466"><span class="hs-identifier hs-var">rep_ids2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var -&gt; CoreExpr -&gt; CoreBind
forall b. b -&gt; Expr b -&gt; Bind b
</span><a href="GHC.Core.html#NonRec"><span class="hs-identifier hs-var">NonRec</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829470"><span class="hs-identifier hs-var">src_var</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829467"><span class="hs-identifier hs-var">arg</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBind -&gt; [CoreBind] -&gt; [CoreBind]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[CoreBind]
</span><a href="#local-6989586621680829465"><span class="hs-identifier hs-var">binds</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-813"></span><span>    </span><span class="annot"><a href="#local-6989586621680829494"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Boxer
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[Boxer]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; UniqSM ([Var], [CoreBind])
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;mk_boxer&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829600"><span class="hs-identifier hs-var">data_con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-814"></span><span>
</span><span id="line-815"></span><span>    </span><span class="annot"><a href="#local-6989586621680829592"><span class="hs-identifier hs-type">mk_rep_app</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Types.Id.Make.html#Unboxer"><span class="hs-identifier hs-type">Unboxer</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSM"><span class="hs-identifier hs-type">UniqSM</span></a></span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-816"></span><span>    </span><span id="local-6989586621680829592"><span class="annot"><span class="annottext">mk_rep_app :: [(Var, Unboxer)] -&gt; CoreExpr -&gt; UniqSM CoreExpr
</span><a href="#local-6989586621680829592"><span class="hs-identifier hs-var hs-var">mk_rep_app</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621680829462"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829462"><span class="hs-identifier hs-var">con_app</span></a></span></span><span>
</span><span id="line-817"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; UniqSM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829462"><span class="hs-identifier hs-var">con_app</span></a></span><span>
</span><span id="line-818"></span><span>    </span><span class="annot"><a href="#local-6989586621680829592"><span class="hs-identifier hs-var">mk_rep_app</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621680829461"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829461"><span class="hs-identifier hs-var">wrap_arg</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829460"><span class="annot"><span class="annottext">Unboxer
</span><a href="#local-6989586621680829460"><span class="hs-identifier hs-var">unboxer</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680829459"><span class="annot"><span class="annottext">[(Var, Unboxer)]
</span><a href="#local-6989586621680829459"><span class="hs-identifier hs-var">prs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680829458"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829458"><span class="hs-identifier hs-var">con_app</span></a></span></span><span>
</span><span id="line-819"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680829457"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829457"><span class="hs-identifier hs-var">rep_ids</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829456"><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621680829456"><span class="hs-identifier hs-var">unbox_fn</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Unboxer
</span><a href="#local-6989586621680829460"><span class="hs-identifier hs-var">unboxer</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829461"><span class="hs-identifier hs-var">wrap_arg</span></a></span><span>
</span><span id="line-820"></span><span>           </span><span class="hs-special">;</span><span> </span><span id="local-6989586621680829455"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829455"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(Var, Unboxer)] -&gt; CoreExpr -&gt; UniqSM CoreExpr
</span><a href="#local-6989586621680829592"><span class="hs-identifier hs-var">mk_rep_app</span></a></span><span> </span><span class="annot"><span class="annottext">[(Var, Unboxer)]
</span><a href="#local-6989586621680829459"><span class="hs-identifier hs-var">prs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; [Var] -&gt; CoreExpr
forall b. Expr b -&gt; [Var] -&gt; Expr b
</span><a href="GHC.Core.html#mkVarApps"><span class="hs-identifier hs-var">mkVarApps</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829458"><span class="hs-identifier hs-var">con_app</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829457"><span class="hs-identifier hs-var">rep_ids</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-821"></span><span>           </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; UniqSM CoreExpr
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621680829456"><span class="hs-identifier hs-var">unbox_fn</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829455"><span class="hs-identifier hs-var">expr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-822"></span><span>
</span><span id="line-823"></span><span>
</span><span id="line-824"></span><span class="annot"><a href="GHC.Types.Id.Make.html#dataConWrapperInlinePragma"><span class="hs-identifier hs-type">dataConWrapperInlinePragma</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#InlinePragma"><span class="hs-identifier hs-type">InlinePragma</span></a></span><span>
</span><span id="line-825"></span><span class="hs-comment">-- See Note [DataCon wrappers are conlike]</span><span>
</span><span id="line-826"></span><span id="dataConWrapperInlinePragma"><span class="annot"><span class="annottext">dataConWrapperInlinePragma :: InlinePragma
</span><a href="GHC.Types.Id.Make.html#dataConWrapperInlinePragma"><span class="hs-identifier hs-var hs-var">dataConWrapperInlinePragma</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InlinePragma
</span><a href="GHC.Types.Basic.html#alwaysInlinePragma"><span class="hs-identifier hs-var">alwaysInlinePragma</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">inl_rule :: RuleMatchInfo
</span><a href="GHC.Types.Basic.html#inl_rule"><span class="hs-identifier hs-var">inl_rule</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RuleMatchInfo
</span><a href="GHC.Types.Basic.html#ConLike"><span class="hs-identifier hs-var">ConLike</span></a></span><span>
</span><span id="line-827"></span><span>                                                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">inl_inline :: InlineSpec
</span><a href="GHC.Types.Basic.html#inl_inline"><span class="hs-identifier hs-var">inl_inline</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InlineSpec
</span><a href="GHC.Types.Basic.html#Inline"><span class="hs-identifier hs-var">Inline</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-828"></span><span>
</span><span id="line-829"></span><span class="hs-comment">{- Note [Activation for data constructor wrappers]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Activation on a data constructor wrapper allows it to inline only in Phase
0. This way rules have a chance to fire if they mention a data constructor on
the left
   RULE &quot;foo&quot;  f (K a b) = ...
Since the LHS of rules are simplified with InitialPhase, we won't
inline the wrapper on the LHS either.

On the other hand, this means that exprIsConApp_maybe must be able to deal
with wrappers so that case-of-constructor is not delayed; see
Note [exprIsConApp_maybe on data constructors with wrappers] for details.

It used to activate in phases 2 (afterInitial) and later, but it makes it
awkward to write a RULE[1] with a constructor on the left: it would work if a
constructor has no wrapper, but whether a constructor has a wrapper depends, for
instance, on the order of type argument of that constructors. Therefore changing
the order of type argument could make previously working RULEs fail.

See also https://gitlab.haskell.org/ghc/ghc/issues/15840 .

Note [DataCon wrappers are conlike]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DataCon workers are clearly ConLike --- they are the &#8220;Con&#8221; in
&#8220;ConLike&#8221;, after all --- but what about DataCon wrappers? Should they
be marked ConLike, too?

Yes, absolutely! As described in Note [CONLIKE pragma] in
GHC.Types.Basic, isConLike influences GHC.Core.Utils.exprIsExpandable,
which is used by both RULE matching and the case-of-known-constructor
optimization. It&#8217;s crucial that both of those things can see
applications of DataCon wrappers:

  * User-defined RULEs match on wrappers, not workers, so we might
    need to look through an unfolding built from a DataCon wrapper to
    determine if a RULE matches.

  * Likewise, if we have something like
        let x = $WC a b in ... case x of { C y z -&gt; e } ...
    we still want to apply case-of-known-constructor.

Therefore, it&#8217;s important that we consider DataCon wrappers conlike.
This is especially true now that we don&#8217;t inline DataCon wrappers
until the final simplifier phase; see Note [Activation for data
constructor wrappers].

For further reading, see:
  * Note [Conlike is interesting] in GHC.Core.Op.Simplify.Utils
  * Note [Lone variables] in GHC.Core.Unfold
  * Note [exprIsConApp_maybe on data constructors with wrappers]
    in GHC.Core.SimpleOpt
  * #18012

Note [Bangs on imported data constructors]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

We pass Maybe [HsImplBang] to mkDataConRep to make use of HsImplBangs
from imported modules.

- Nothing &lt;=&gt; use HsSrcBangs
- Just bangs &lt;=&gt; use HsImplBangs

For imported types we can't work it all out from the HsSrcBangs,
because we want to be very sure to follow what the original module
(where the data type was declared) decided, and that depends on what
flags were enabled when it was compiled. So we record the decisions in
the interface file.

The HsImplBangs passed are in 1-1 correspondence with the
dataConOrigArgTys of the DataCon.

Note [Data con wrappers and unlifted types]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider
   data T = MkT !Int#

We certainly do not want to make a wrapper
   $WMkT x = case x of y { DEFAULT -&gt; MkT y }

For a start, it's still to generate a no-op.  But worse, since wrappers
are currently injected at TidyCore, we don't even optimise it away!
So the stupid case expression stays there.  This actually happened for
the Integer data type (see #1600 comment:66)!

Note [Data con wrappers and GADT syntax]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider these two very similar data types:

  data T1 a b = MkT1 b

  data T2 a b where
    MkT2 :: forall b a. b -&gt; T2 a b

Despite their similar appearance, T2 will have a data con wrapper but T1 will
not. What sets them apart? The types of their constructors, which are:

  MkT1 :: forall a b. b -&gt; T1 a b
  MkT2 :: forall b a. b -&gt; T2 a b

MkT2's use of GADT syntax allows it to permute the order in which `a` and `b`
would normally appear. See Note [DataCon user type variable binders] in GHC.Core.DataCon
for further discussion on this topic.

The worker data cons for T1 and T2, however, both have types such that `a` is
expected to come before `b` as arguments. Because MkT2 permutes this order, it
needs a data con wrapper to swizzle around the type variables to be in the
order the worker expects.

A somewhat surprising consequence of this is that *newtypes* can have data con
wrappers! After all, a newtype can also be written with GADT syntax:

  newtype T3 a b where
    MkT3 :: forall b a. b -&gt; T3 a b

Again, this needs a wrapper data con to reorder the type variables. It does
mean that this newtype constructor requires another level of indirection when
being called, but the inliner should make swift work of that.

Note [HsImplBangs for newtypes]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Most of the time, we use the dataConSrctoImplBang function to decide what
strictness/unpackedness to use for the fields of a data type constructor. But
there is an exception to this rule: newtype constructors. You might not think
that newtypes would pose a challenge, since newtypes are seemingly forbidden
from having strictness annotations in the first place. But consider this
(from #16141):

  {-# LANGUAGE StrictData #-}
  {-# OPTIONS_GHC -O #-}
  newtype T a b where
    MkT :: forall b a. Int -&gt; T a b

Because StrictData (plus optimization) is enabled, invoking
dataConSrcToImplBang would sneak in and unpack the field of type Int to Int#!
This would be disastrous, since the wrapper for `MkT` uses a coercion involving
Int, not Int#.

Bottom line: dataConSrcToImplBang should never be invoked for newtypes. In the
case of a newtype constructor, we simply hardcode its dcr_bangs field to
[HsLazy].
-}</span><span>
</span><span id="line-970"></span><span>
</span><span id="line-971"></span><span class="hs-comment">-------------------------</span><span>
</span><span id="line-972"></span><span class="annot"><a href="GHC.Types.Id.Make.html#newLocal"><span class="hs-identifier hs-type">newLocal</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSM"><span class="hs-identifier hs-type">UniqSM</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span>
</span><span id="line-973"></span><span id="newLocal"><span class="annot"><span class="annottext">newLocal :: Scaled Type -&gt; UniqSM Var
</span><a href="GHC.Types.Id.Make.html#newLocal"><span class="hs-identifier hs-var hs-var">newLocal</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span id="local-6989586621680829451"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829451"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680829450"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829450"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621680829449"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680829449"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">UniqSM Unique
forall (m :: * -&gt; *). MonadUnique m =&gt; m Unique
</span><a href="GHC.Types.Unique.Supply.html#getUniqueM"><span class="hs-identifier hs-var">getUniqueM</span></a></span><span>
</span><span id="line-974"></span><span>                            </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Var -&gt; UniqSM Var
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RuleName -&gt; Unique -&gt; Type -&gt; Type -&gt; Var
</span><a href="GHC.Types.Id.html#mkSysLocalOrCoVar"><span class="hs-identifier hs-var">mkSysLocalOrCoVar</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RuleName
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dt&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680829449"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829451"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829450"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-975"></span><span>                 </span><span class="hs-comment">-- We should not have &quot;OrCoVar&quot; here, this is a bug (#17545)</span><span>
</span><span id="line-976"></span><span>
</span><span id="line-977"></span><span>
</span><span id="line-978"></span><span class="hs-comment">-- | Unpack/Strictness decisions from source module.</span><span>
</span><span id="line-979"></span><span class="hs-comment">--</span><span>
</span><span id="line-980"></span><span class="hs-comment">-- This function should only ever be invoked for data constructor fields, and</span><span>
</span><span id="line-981"></span><span class="hs-comment">-- never on the field of a newtype constructor.</span><span>
</span><span id="line-982"></span><span class="hs-comment">-- See @Note [HsImplBangs for newtypes]@.</span><span>
</span><span id="line-983"></span><span class="annot"><a href="GHC.Types.Id.Make.html#dataConSrcToImplBang"><span class="hs-identifier hs-type">dataConSrcToImplBang</span></a></span><span>
</span><span id="line-984"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span>
</span><span id="line-985"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.FamInstEnv.html#FamInstEnvs"><span class="hs-identifier hs-type">FamInstEnvs</span></a></span><span>
</span><span id="line-986"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-987"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#HsSrcBang"><span class="hs-identifier hs-type">HsSrcBang</span></a></span><span>
</span><span id="line-988"></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#HsImplBang"><span class="hs-identifier hs-type">HsImplBang</span></a></span><span>
</span><span id="line-989"></span><span>
</span><span id="line-990"></span><span id="dataConSrcToImplBang"><span class="annot"><span class="annottext">dataConSrcToImplBang :: DynFlags -&gt; FamInstEnvs -&gt; Scaled Type -&gt; HsSrcBang -&gt; HsImplBang
</span><a href="GHC.Types.Id.Make.html#dataConSrcToImplBang"><span class="hs-identifier hs-var hs-var">dataConSrcToImplBang</span></a></span></span><span> </span><span id="local-6989586621680829446"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680829446"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680829445"><span class="annot"><span class="annottext">FamInstEnvs
</span><a href="#local-6989586621680829445"><span class="hs-identifier hs-var">fam_envs</span></a></span></span><span> </span><span id="local-6989586621680829444"><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621680829444"><span class="hs-identifier hs-var">arg_ty</span></a></span></span><span>
</span><span id="line-991"></span><span>                     </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#HsSrcBang"><span class="hs-identifier hs-type">HsSrcBang</span></a></span><span> </span><span id="local-6989586621680829442"><span class="annot"><span class="annottext">SourceText
</span><a href="#local-6989586621680829442"><span class="hs-identifier hs-var">ann</span></a></span></span><span> </span><span id="local-6989586621680829441"><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="#local-6989586621680829441"><span class="hs-identifier hs-var">unpk</span></a></span></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="GHC.Core.DataCon.html#NoSrcStrict"><span class="hs-identifier hs-var">NoSrcStrict</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-992"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#xopt"><span class="hs-identifier hs-var">xopt</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#StrictData"><span class="hs-identifier hs-var">LangExt.StrictData</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680829446"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-comment">-- StrictData =&gt; strict field</span><span>
</span><span id="line-993"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FamInstEnvs -&gt; Scaled Type -&gt; HsSrcBang -&gt; HsImplBang
</span><a href="GHC.Types.Id.Make.html#dataConSrcToImplBang"><span class="hs-identifier hs-var">dataConSrcToImplBang</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680829446"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FamInstEnvs
</span><a href="#local-6989586621680829445"><span class="hs-identifier hs-var">fam_envs</span></a></span><span> </span><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621680829444"><span class="hs-identifier hs-var">arg_ty</span></a></span><span>
</span><span id="line-994"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SourceText -&gt; SrcUnpackedness -&gt; SrcStrictness -&gt; HsSrcBang
</span><a href="GHC.Core.DataCon.html#HsSrcBang"><span class="hs-identifier hs-var">HsSrcBang</span></a></span><span> </span><span class="annot"><span class="annottext">SourceText
</span><a href="#local-6989586621680829442"><span class="hs-identifier hs-var">ann</span></a></span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="#local-6989586621680829441"><span class="hs-identifier hs-var">unpk</span></a></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="GHC.Core.DataCon.html#SrcStrict"><span class="hs-identifier hs-var">SrcStrict</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-995"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-comment">-- no StrictData =&gt; lazy field</span><span>
</span><span id="line-996"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsImplBang
</span><a href="GHC.Core.DataCon.html#HsLazy"><span class="hs-identifier hs-var">HsLazy</span></a></span><span>
</span><span id="line-997"></span><span>
</span><span id="line-998"></span><span class="annot"><a href="GHC.Types.Id.Make.html#dataConSrcToImplBang"><span class="hs-identifier hs-var">dataConSrcToImplBang</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">FamInstEnvs
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Scaled Type
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#HsSrcBang"><span class="hs-identifier hs-type">HsSrcBang</span></a></span><span> </span><span class="annot"><span class="annottext">SourceText
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="GHC.Core.DataCon.html#SrcLazy"><span class="hs-identifier hs-var">SrcLazy</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-999"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsImplBang
</span><a href="GHC.Core.DataCon.html#HsLazy"><span class="hs-identifier hs-var">HsLazy</span></a></span><span>
</span><span id="line-1000"></span><span>
</span><span id="line-1001"></span><span class="annot"><a href="GHC.Types.Id.Make.html#dataConSrcToImplBang"><span class="hs-identifier hs-var">dataConSrcToImplBang</span></a></span><span> </span><span id="local-6989586621680829435"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680829435"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680829434"><span class="annot"><span class="annottext">FamInstEnvs
</span><a href="#local-6989586621680829434"><span class="hs-identifier hs-var">fam_envs</span></a></span></span><span> </span><span id="local-6989586621680829433"><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621680829433"><span class="hs-identifier hs-var">arg_ty</span></a></span></span><span>
</span><span id="line-1002"></span><span>                     </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#HsSrcBang"><span class="hs-identifier hs-type">HsSrcBang</span></a></span><span> </span><span class="annot"><span class="annottext">SourceText
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680829432"><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="#local-6989586621680829432"><span class="hs-identifier hs-var">unpk_prag</span></a></span></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="GHC.Core.DataCon.html#SrcStrict"><span class="hs-identifier hs-var">SrcStrict</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1003"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Type -&gt; Bool
Type -&gt; Bool
</span><a href="GHC.Core.Type.html#isUnliftedType"><span class="hs-identifier hs-var">isUnliftedType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Scaled Type -&gt; Type
forall a. Scaled a -&gt; a
</span><a href="GHC.Core.TyCo.Rep.html#scaledThing"><span class="hs-identifier hs-var">scaledThing</span></a></span><span> </span><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621680829433"><span class="hs-identifier hs-var">arg_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1004"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsImplBang
</span><a href="GHC.Core.DataCon.html#HsLazy"><span class="hs-identifier hs-var">HsLazy</span></a></span><span>  </span><span class="hs-comment">-- For !Int#, say, use HsLazy</span><span>
</span><span id="line-1005"></span><span>            </span><span class="hs-comment">-- See Note [Data con wrappers and unlifted types]</span><span>
</span><span id="line-1006"></span><span>
</span><span id="line-1007"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_OmitInterfacePragmas"><span class="hs-identifier hs-var">Opt_OmitInterfacePragmas</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680829435"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- Don't unpack if -fomit-iface-pragmas</span><span>
</span><span id="line-1008"></span><span>          </span><span class="hs-comment">-- Don't unpack if we aren't optimising; rather arbitrarily,</span><span>
</span><span id="line-1009"></span><span>          </span><span class="hs-comment">-- we use -fomit-iface-pragmas as the indication</span><span>
</span><span id="line-1010"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680829428"><span class="annot"><span class="annottext">mb_co :: Maybe (Coercion, Type)
</span><a href="#local-6989586621680829428"><span class="hs-identifier hs-var hs-var">mb_co</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FamInstEnvs -&gt; Type -&gt; Maybe (Coercion, Type)
</span><a href="GHC.Core.FamInstEnv.html#topNormaliseType_maybe"><span class="hs-identifier hs-var">topNormaliseType_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">FamInstEnvs
</span><a href="#local-6989586621680829434"><span class="hs-identifier hs-var">fam_envs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Scaled Type -&gt; Type
forall a. Scaled a -&gt; a
</span><a href="GHC.Core.TyCo.Rep.html#scaledThing"><span class="hs-identifier hs-var">scaledThing</span></a></span><span> </span><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621680829433"><span class="hs-identifier hs-var">arg_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1011"></span><span>                     </span><span class="hs-comment">-- Unwrap type families and newtypes</span><span>
</span><span id="line-1012"></span><span>        </span><span id="local-6989586621680829426"><span class="annot"><span class="annottext">arg_ty' :: Scaled Type
</span><a href="#local-6989586621680829426"><span class="hs-identifier hs-var hs-var">arg_ty'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe (Coercion, Type)
</span><a href="#local-6989586621680829428"><span class="hs-identifier hs-var">mb_co</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Coercion
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621680829425"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829425"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Scaled Type -&gt; Type -&gt; Scaled Type
forall a b. Scaled a -&gt; b -&gt; Scaled b
</span><a href="GHC.Core.Type.html#scaledSet"><span class="hs-identifier hs-var">scaledSet</span></a></span><span> </span><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621680829433"><span class="hs-identifier hs-var">arg_ty</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829425"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Maybe (Coercion, Type)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621680829433"><span class="hs-identifier hs-var">arg_ty</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1013"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FamInstEnvs -&gt; Type -&gt; Bool
</span><a href="GHC.Types.Id.Make.html#isUnpackableType"><span class="hs-identifier hs-var">isUnpackableType</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680829435"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FamInstEnvs
</span><a href="#local-6989586621680829434"><span class="hs-identifier hs-var">fam_envs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Scaled Type -&gt; Type
forall a. Scaled a -&gt; a
</span><a href="GHC.Core.TyCo.Rep.html#scaledThing"><span class="hs-identifier hs-var">scaledThing</span></a></span><span> </span><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621680829426"><span class="hs-identifier hs-var">arg_ty'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1014"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680829422"><span class="annot"><span class="annottext">[(Scaled Type, StrictnessMark)]
</span><a href="#local-6989586621680829422"><span class="hs-identifier hs-var">rep_tys</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(Unboxer, Boxer)
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Scaled Type -&gt; ([(Scaled Type, StrictnessMark)], (Unboxer, Boxer))
</span><a href="GHC.Types.Id.Make.html#dataConArgUnpack"><span class="hs-identifier hs-var">dataConArgUnpack</span></a></span><span> </span><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621680829426"><span class="hs-identifier hs-var">arg_ty'</span></a></span><span>
</span><span id="line-1015"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="#local-6989586621680829432"><span class="hs-identifier hs-var">unpk_prag</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1016"></span><span>      </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="GHC.Core.DataCon.html#NoSrcUnpack"><span class="hs-identifier hs-var">NoSrcUnpack</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1017"></span><span>        </span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_UnboxStrictFields"><span class="hs-identifier hs-var">Opt_UnboxStrictFields</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680829435"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-1018"></span><span>            </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_UnboxSmallStrictFields"><span class="hs-identifier hs-var">Opt_UnboxSmallStrictFields</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680829435"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-1019"></span><span>                </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">[(Scaled Type, StrictnessMark)]
</span><a href="#local-6989586621680829422"><span class="hs-identifier hs-var">rep_tys</span></a></span><span> </span><span class="annot"><span class="annottext">[(Scaled Type, StrictnessMark)] -&gt; Arity -&gt; Bool
forall a. [a] -&gt; Arity -&gt; Bool
</span><a href="GHC.Utils.Misc.html#lengthAtMost"><span class="hs-operator hs-var">`lengthAtMost`</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- See Note [Unpack one-wide fields]</span><span>
</span><span id="line-1020"></span><span>      </span><span id="local-6989586621680829416"><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="#local-6989586621680829416"><span class="hs-identifier hs-var">srcUnpack</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness -&gt; Bool
</span><a href="GHC.Core.DataCon.html#isSrcUnpacked"><span class="hs-identifier hs-var">isSrcUnpacked</span></a></span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="#local-6989586621680829416"><span class="hs-identifier hs-var">srcUnpack</span></a></span><span>
</span><span id="line-1021"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe (Coercion, Type)
</span><a href="#local-6989586621680829428"><span class="hs-identifier hs-var">mb_co</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1022"></span><span>      </span><span class="annot"><span class="annottext">Maybe (Coercion, Type)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe Coercion -&gt; HsImplBang
</span><a href="GHC.Core.DataCon.html#HsUnpack"><span class="hs-identifier hs-var">HsUnpack</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Coercion
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-1023"></span><span>      </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680829413"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680829413"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe Coercion -&gt; HsImplBang
</span><a href="GHC.Core.DataCon.html#HsUnpack"><span class="hs-identifier hs-var">HsUnpack</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Coercion -&gt; Maybe Coercion
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680829413"><span class="hs-identifier hs-var">co</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1024"></span><span>
</span><span id="line-1025"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-comment">-- Record the strict-but-no-unpack decision</span><span>
</span><span id="line-1026"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HsImplBang
</span><a href="GHC.Core.DataCon.html#HsStrict"><span class="hs-identifier hs-var">HsStrict</span></a></span><span>
</span><span id="line-1027"></span><span>
</span><span id="line-1028"></span><span>
</span><span id="line-1029"></span><span class="hs-comment">-- | Wrappers/Workers and representation following Unpack/Strictness</span><span>
</span><span id="line-1030"></span><span class="hs-comment">-- decisions</span><span>
</span><span id="line-1031"></span><span class="annot"><a href="GHC.Types.Id.Make.html#dataConArgRep"><span class="hs-identifier hs-type">dataConArgRep</span></a></span><span>
</span><span id="line-1032"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-1033"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#HsImplBang"><span class="hs-identifier hs-type">HsImplBang</span></a></span><span>
</span><span id="line-1034"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Core.DataCon.html#StrictnessMark"><span class="hs-identifier hs-type">StrictnessMark</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- Rep types</span><span>
</span><span id="line-1035"></span><span>     </span><span class="hs-special">,</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Id.Make.html#Unboxer"><span class="hs-identifier hs-type">Unboxer</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Types.Id.Make.html#Boxer"><span class="hs-identifier hs-type">Boxer</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1036"></span><span>
</span><span id="line-1037"></span><span id="dataConArgRep"><span class="annot"><span class="annottext">dataConArgRep :: Scaled Type
-&gt; HsImplBang
-&gt; ([(Scaled Type, StrictnessMark)], (Unboxer, Boxer))
</span><a href="GHC.Types.Id.Make.html#dataConArgRep"><span class="hs-identifier hs-var hs-var">dataConArgRep</span></a></span></span><span> </span><span id="local-6989586621680829411"><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621680829411"><span class="hs-identifier hs-var">arg_ty</span></a></span></span><span> </span><span class="annot"><span class="annottext">HsImplBang
</span><a href="GHC.Core.DataCon.html#HsLazy"><span class="hs-identifier hs-var">HsLazy</span></a></span><span>
</span><span id="line-1038"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621680829411"><span class="hs-identifier hs-var">arg_ty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">StrictnessMark
</span><a href="GHC.Core.DataCon.html#NotMarkedStrict"><span class="hs-identifier hs-var">NotMarkedStrict</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unboxer
</span><a href="GHC.Types.Id.Make.html#unitUnboxer"><span class="hs-identifier hs-var">unitUnboxer</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Boxer
</span><a href="GHC.Types.Id.Make.html#unitBoxer"><span class="hs-identifier hs-var">unitBoxer</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1039"></span><span>
</span><span id="line-1040"></span><span class="annot"><a href="GHC.Types.Id.Make.html#dataConArgRep"><span class="hs-identifier hs-var">dataConArgRep</span></a></span><span> </span><span id="local-6989586621680829407"><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621680829407"><span class="hs-identifier hs-var">arg_ty</span></a></span></span><span> </span><span class="annot"><span class="annottext">HsImplBang
</span><a href="GHC.Core.DataCon.html#HsStrict"><span class="hs-identifier hs-var">HsStrict</span></a></span><span>
</span><span id="line-1041"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621680829407"><span class="hs-identifier hs-var">arg_ty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">StrictnessMark
</span><a href="GHC.Core.DataCon.html#MarkedStrict"><span class="hs-identifier hs-var">MarkedStrict</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unboxer
</span><a href="GHC.Types.Id.Make.html#seqUnboxer"><span class="hs-identifier hs-var">seqUnboxer</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Boxer
</span><a href="GHC.Types.Id.Make.html#unitBoxer"><span class="hs-identifier hs-var">unitBoxer</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1042"></span><span>
</span><span id="line-1043"></span><span class="annot"><a href="GHC.Types.Id.Make.html#dataConArgRep"><span class="hs-identifier hs-var">dataConArgRep</span></a></span><span> </span><span id="local-6989586621680829404"><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621680829404"><span class="hs-identifier hs-var">arg_ty</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#HsUnpack"><span class="hs-identifier hs-type">HsUnpack</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Coercion
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1044"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680829403"><span class="annot"><span class="annottext">[(Scaled Type, StrictnessMark)]
</span><a href="#local-6989586621680829403"><span class="hs-identifier hs-var">rep_tys</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829402"><span class="annot"><span class="annottext">(Unboxer, Boxer)
</span><a href="#local-6989586621680829402"><span class="hs-identifier hs-var">wrappers</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Scaled Type -&gt; ([(Scaled Type, StrictnessMark)], (Unboxer, Boxer))
</span><a href="GHC.Types.Id.Make.html#dataConArgUnpack"><span class="hs-identifier hs-var">dataConArgUnpack</span></a></span><span> </span><span class="annot"><span class="annottext">Scaled Type
</span><a href="#local-6989586621680829404"><span class="hs-identifier hs-var">arg_ty</span></a></span><span>
</span><span id="line-1045"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[(Scaled Type, StrictnessMark)]
</span><a href="#local-6989586621680829403"><span class="hs-identifier hs-var">rep_tys</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(Unboxer, Boxer)
</span><a href="#local-6989586621680829402"><span class="hs-identifier hs-var">wrappers</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1046"></span><span>
</span><span id="line-1047"></span><span class="annot"><a href="GHC.Types.Id.Make.html#dataConArgRep"><span class="hs-identifier hs-var">dataConArgRep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span id="local-6989586621680829401"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829401"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#HsUnpack"><span class="hs-identifier hs-type">HsUnpack</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680829400"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680829400"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1048"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680829399"><span class="annot"><span class="annottext">co_rep_ty :: Type
</span><a href="#local-6989586621680829399"><span class="hs-identifier hs-var hs-var">co_rep_ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; Type
</span><a href="GHC.Core.Coercion.html#coercionRKind"><span class="hs-identifier hs-var">coercionRKind</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680829400"><span class="hs-identifier hs-var">co</span></a></span><span>
</span><span id="line-1049"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680829397"><span class="annot"><span class="annottext">[(Scaled Type, StrictnessMark)]
</span><a href="#local-6989586621680829397"><span class="hs-identifier hs-var">rep_tys</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829396"><span class="annot"><span class="annottext">(Unboxer, Boxer)
</span><a href="#local-6989586621680829396"><span class="hs-identifier hs-var">wrappers</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Scaled Type -&gt; ([(Scaled Type, StrictnessMark)], (Unboxer, Boxer))
</span><a href="GHC.Types.Id.Make.html#dataConArgUnpack"><span class="hs-identifier hs-var">dataConArgUnpack</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; Scaled Type
forall a. Type -&gt; a -&gt; Scaled a
</span><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-var">Scaled</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829401"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829399"><span class="hs-identifier hs-var">co_rep_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1050"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[(Scaled Type, StrictnessMark)]
</span><a href="#local-6989586621680829397"><span class="hs-identifier hs-var">rep_tys</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; Type -&gt; (Unboxer, Boxer) -&gt; (Unboxer, Boxer)
</span><a href="GHC.Types.Id.Make.html#wrapCo"><span class="hs-identifier hs-var">wrapCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680829400"><span class="hs-identifier hs-var">co</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829399"><span class="hs-identifier hs-var">co_rep_ty</span></a></span><span> </span><span class="annot"><span class="annottext">(Unboxer, Boxer)
</span><a href="#local-6989586621680829396"><span class="hs-identifier hs-var">wrappers</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1051"></span><span>
</span><span id="line-1052"></span><span>
</span><span id="line-1053"></span><span class="hs-comment">-------------------------</span><span>
</span><span id="line-1054"></span><span class="annot"><a href="GHC.Types.Id.Make.html#wrapCo"><span class="hs-identifier hs-type">wrapCo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Coercion"><span class="hs-identifier hs-type">Coercion</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Id.Make.html#Unboxer"><span class="hs-identifier hs-type">Unboxer</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#Boxer"><span class="hs-identifier hs-type">Boxer</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Id.Make.html#Unboxer"><span class="hs-identifier hs-type">Unboxer</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#Boxer"><span class="hs-identifier hs-type">Boxer</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1055"></span><span id="wrapCo"><span class="annot"><span class="annottext">wrapCo :: Coercion -&gt; Type -&gt; (Unboxer, Boxer) -&gt; (Unboxer, Boxer)
</span><a href="GHC.Types.Id.Make.html#wrapCo"><span class="hs-identifier hs-var hs-var">wrapCo</span></a></span></span><span> </span><span id="local-6989586621680829394"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680829394"><span class="hs-identifier hs-var">co</span></a></span></span><span> </span><span id="local-6989586621680829393"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829393"><span class="hs-identifier hs-var">rep_ty</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680829392"><span class="annot"><span class="annottext">Unboxer
</span><a href="#local-6989586621680829392"><span class="hs-identifier hs-var">unbox_rep</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829391"><span class="annot"><span class="annottext">Boxer
</span><a href="#local-6989586621680829391"><span class="hs-identifier hs-var">box_rep</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-comment">-- co :: arg_ty ~ rep_ty</span><span>
</span><span id="line-1056"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unboxer
</span><a href="#local-6989586621680829390"><span class="hs-identifier hs-var">unboxer</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Boxer
</span><a href="#local-6989586621680829389"><span class="hs-identifier hs-var">boxer</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1057"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1058"></span><span>    </span><span id="local-6989586621680829390"><span class="annot"><span class="annottext">unboxer :: Unboxer
</span><a href="#local-6989586621680829390"><span class="hs-identifier hs-var hs-var">unboxer</span></a></span></span><span> </span><span id="local-6989586621680829385"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829385"><span class="hs-identifier hs-var">arg_id</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621680829384"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829384"><span class="hs-identifier hs-var">rep_id</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Scaled Type -&gt; UniqSM Var
</span><a href="GHC.Types.Id.Make.html#newLocal"><span class="hs-identifier hs-var">newLocal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; Scaled Type
forall a. Type -&gt; a -&gt; Scaled a
</span><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-var">Scaled</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; Type
</span><a href="GHC.Types.Id.html#idMult"><span class="hs-identifier hs-var">idMult</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829385"><span class="hs-identifier hs-var">arg_id</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829393"><span class="hs-identifier hs-var">rep_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1059"></span><span>                        </span><span class="hs-special">;</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680829382"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829382"><span class="hs-identifier hs-var">rep_ids</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829381"><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621680829381"><span class="hs-identifier hs-var">rep_fn</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Unboxer
</span><a href="#local-6989586621680829392"><span class="hs-identifier hs-var">unbox_rep</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829384"><span class="hs-identifier hs-var">rep_id</span></a></span><span>
</span><span id="line-1060"></span><span>                        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680829380"><span class="annot"><span class="annottext">co_bind :: CoreBind
</span><a href="#local-6989586621680829380"><span class="hs-identifier hs-var hs-var">co_bind</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var -&gt; CoreExpr -&gt; CoreBind
forall b. b -&gt; Expr b -&gt; Bind b
</span><a href="GHC.Core.html#NonRec"><span class="hs-identifier hs-var">NonRec</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829384"><span class="hs-identifier hs-var">rep_id</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; CoreExpr
forall b. Var -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829385"><span class="hs-identifier hs-var">arg_id</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; Coercion -&gt; CoreExpr
forall b. Expr b -&gt; Coercion -&gt; Expr b
</span><a href="GHC.Core.html#Cast"><span class="hs-operator hs-var">`Cast`</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680829394"><span class="hs-identifier hs-var">co</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1061"></span><span>                        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">([Var], CoreExpr -&gt; CoreExpr)
-&gt; UniqSM ([Var], CoreExpr -&gt; CoreExpr)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829382"><span class="hs-identifier hs-var">rep_ids</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreBind -&gt; CoreExpr -&gt; CoreExpr
forall b. Bind b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#Let"><span class="hs-identifier hs-var">Let</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBind
</span><a href="#local-6989586621680829380"><span class="hs-identifier hs-var">co_bind</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr)
-&gt; (CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; CoreExpr
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621680829381"><span class="hs-identifier hs-var">rep_fn</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1062"></span><span>    </span><span id="local-6989586621680829389"><span class="annot"><span class="annottext">boxer :: Boxer
</span><a href="#local-6989586621680829389"><span class="hs-identifier hs-var hs-var">boxer</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(TCvSubst -&gt; UniqSM ([Var], CoreExpr)) -&gt; Boxer
</span><a href="GHC.Types.Id.Make.html#Boxer"><span class="hs-identifier hs-var">Boxer</span></a></span><span> </span><span class="annot"><span class="annottext">((TCvSubst -&gt; UniqSM ([Var], CoreExpr)) -&gt; Boxer)
-&gt; (TCvSubst -&gt; UniqSM ([Var], CoreExpr)) -&gt; Boxer
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621680829371"><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680829371"><span class="hs-identifier hs-var">subst</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1063"></span><span>            </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680829370"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829370"><span class="hs-identifier hs-var">rep_ids</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829369"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829369"><span class="hs-identifier hs-var">rep_expr</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1064"></span><span>                    </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Boxer
</span><a href="#local-6989586621680829391"><span class="hs-identifier hs-var">box_rep</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1065"></span><span>                         </span><span class="annot"><span class="annottext">Boxer
</span><a href="GHC.Types.Id.Make.html#UnitBox"><span class="hs-identifier hs-var">UnitBox</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621680829368"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829368"><span class="hs-identifier hs-var">rep_id</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Scaled Type -&gt; UniqSM Var
</span><a href="GHC.Types.Id.Make.html#newLocal"><span class="hs-identifier hs-var">newLocal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Scaled Type
forall a. a -&gt; Scaled a
</span><a href="GHC.Core.Type.html#linear"><span class="hs-identifier hs-var">linear</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Scaled Type) -&gt; Type -&gt; Scaled Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HasCallStack =&gt; TCvSubst -&gt; Type -&gt; Type
TCvSubst -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Subst.html#substTy"><span class="hs-identifier hs-var">TcType.substTy</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680829371"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829393"><span class="hs-identifier hs-var">rep_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1066"></span><span>                                       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">([Var], CoreExpr) -&gt; UniqSM ([Var], CoreExpr)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829368"><span class="hs-identifier hs-var">rep_id</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var -&gt; CoreExpr
forall b. Var -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829368"><span class="hs-identifier hs-var">rep_id</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1067"></span><span>                         </span><span class="annot"><a href="GHC.Types.Id.Make.html#Boxer"><span class="hs-identifier hs-type">Boxer</span></a></span><span> </span><span id="local-6989586621680829365"><span class="annot"><span class="annottext">TCvSubst -&gt; UniqSM ([Var], CoreExpr)
</span><a href="#local-6989586621680829365"><span class="hs-identifier hs-var">boxer</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TCvSubst -&gt; UniqSM ([Var], CoreExpr)
</span><a href="#local-6989586621680829365"><span class="hs-identifier hs-var">boxer</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680829371"><span class="hs-identifier hs-var">subst</span></a></span><span>
</span><span id="line-1068"></span><span>               </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680829364"><span class="annot"><span class="annottext">sco :: Coercion
</span><a href="#local-6989586621680829364"><span class="hs-identifier hs-var hs-var">sco</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TCvSubst -&gt; Coercion -&gt; Coercion
</span><a href="GHC.Core.TyCo.Subst.html#substCoUnchecked"><span class="hs-identifier hs-var">substCoUnchecked</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680829371"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680829394"><span class="hs-identifier hs-var">co</span></a></span><span>
</span><span id="line-1069"></span><span>               </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">([Var], CoreExpr) -&gt; UniqSM ([Var], CoreExpr)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829370"><span class="hs-identifier hs-var">rep_ids</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829369"><span class="hs-identifier hs-var">rep_expr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; Coercion -&gt; CoreExpr
forall b. Expr b -&gt; Coercion -&gt; Expr b
</span><a href="GHC.Core.html#Cast"><span class="hs-operator hs-var">`Cast`</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion -&gt; Coercion
</span><a href="GHC.Core.Coercion.html#mkSymCo"><span class="hs-identifier hs-var">mkSymCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680829364"><span class="hs-identifier hs-var">sco</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1070"></span><span>
</span><span id="line-1071"></span><span class="hs-comment">------------------------</span><span>
</span><span id="line-1072"></span><span class="annot"><a href="GHC.Types.Id.Make.html#seqUnboxer"><span class="hs-identifier hs-type">seqUnboxer</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#Unboxer"><span class="hs-identifier hs-type">Unboxer</span></a></span><span>
</span><span id="line-1073"></span><span id="seqUnboxer"><span class="annot"><span class="annottext">seqUnboxer :: Unboxer
</span><a href="GHC.Types.Id.Make.html#seqUnboxer"><span class="hs-identifier hs-var hs-var">seqUnboxer</span></a></span></span><span> </span><span id="local-6989586621680829361"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829361"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([Var], CoreExpr -&gt; CoreExpr)
-&gt; UniqSM ([Var], CoreExpr -&gt; CoreExpr)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829361"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; Var -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Core.Utils.html#mkDefaultCase"><span class="hs-identifier hs-var">mkDefaultCase</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; CoreExpr
forall b. Var -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829361"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829361"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1074"></span><span>
</span><span id="line-1075"></span><span class="annot"><a href="GHC.Types.Id.Make.html#unitUnboxer"><span class="hs-identifier hs-type">unitUnboxer</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#Unboxer"><span class="hs-identifier hs-type">Unboxer</span></a></span><span>
</span><span id="line-1076"></span><span id="unitUnboxer"><span class="annot"><span class="annottext">unitUnboxer :: Unboxer
</span><a href="GHC.Types.Id.Make.html#unitUnboxer"><span class="hs-identifier hs-var hs-var">unitUnboxer</span></a></span></span><span> </span><span id="local-6989586621680829360"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829360"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([Var], CoreExpr -&gt; CoreExpr)
-&gt; UniqSM ([Var], CoreExpr -&gt; CoreExpr)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829360"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680829359"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829359"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829359"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1077"></span><span>
</span><span id="line-1078"></span><span class="annot"><a href="GHC.Types.Id.Make.html#unitBoxer"><span class="hs-identifier hs-type">unitBoxer</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#Boxer"><span class="hs-identifier hs-type">Boxer</span></a></span><span>
</span><span id="line-1079"></span><span id="unitBoxer"><span class="annot"><span class="annottext">unitBoxer :: Boxer
</span><a href="GHC.Types.Id.Make.html#unitBoxer"><span class="hs-identifier hs-var hs-var">unitBoxer</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Boxer
</span><a href="GHC.Types.Id.Make.html#UnitBox"><span class="hs-identifier hs-var">UnitBox</span></a></span><span>
</span><span id="line-1080"></span><span>
</span><span id="line-1081"></span><span class="hs-comment">-------------------------</span><span>
</span><span id="line-1082"></span><span class="annot"><a href="GHC.Types.Id.Make.html#dataConArgUnpack"><span class="hs-identifier hs-type">dataConArgUnpack</span></a></span><span>
</span><span id="line-1083"></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-1084"></span><span>   </span><span class="hs-glyph">-&gt;</span><span>  </span><span class="hs-special">(</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#StrictnessMark"><span class="hs-identifier hs-type">StrictnessMark</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>   </span><span class="hs-comment">-- Rep types</span><span>
</span><span id="line-1085"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Id.Make.html#Unboxer"><span class="hs-identifier hs-type">Unboxer</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#Boxer"><span class="hs-identifier hs-type">Boxer</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-1086"></span><span>
</span><span id="line-1087"></span><span id="dataConArgUnpack"><span class="annot"><span class="annottext">dataConArgUnpack :: Scaled Type -&gt; ([(Scaled Type, StrictnessMark)], (Unboxer, Boxer))
</span><a href="GHC.Types.Id.Make.html#dataConArgUnpack"><span class="hs-identifier hs-var hs-var">dataConArgUnpack</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span id="local-6989586621680829358"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829358"><span class="hs-identifier hs-var">arg_mult</span></a></span></span><span> </span><span id="local-6989586621680829357"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829357"><span class="hs-identifier hs-var">arg_ty</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1088"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680829356"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829356"><span class="hs-identifier hs-var">tc</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829355"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829355"><span class="hs-identifier hs-var">tc_args</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Type -&gt; Maybe (TyCon, [Type])
Type -&gt; Maybe (TyCon, [Type])
</span><a href="GHC.Core.Type.html#splitTyConApp_maybe"><span class="hs-identifier hs-var">splitTyConApp_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829357"><span class="hs-identifier hs-var">arg_ty</span></a></span><span>
</span><span id="line-1089"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680829353"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829353"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Maybe DataCon
</span><a href="GHC.Core.TyCon.html#tyConSingleAlgDataCon_maybe"><span class="hs-identifier hs-var">tyConSingleAlgDataCon_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829356"><span class="hs-identifier hs-var">tc</span></a></span><span>
</span><span id="line-1090"></span><span>      </span><span class="hs-comment">-- NB: check for an *algebraic* data type</span><span>
</span><span id="line-1091"></span><span>      </span><span class="hs-comment">-- A recursive newtype might mean that</span><span>
</span><span id="line-1092"></span><span>      </span><span class="hs-comment">-- 'arg_ty' is a newtype</span><span>
</span><span id="line-1093"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680829351"><span class="annot"><span class="annottext">rep_tys :: [Scaled Type]
</span><a href="#local-6989586621680829351"><span class="hs-identifier hs-var hs-var">rep_tys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Scaled Type -&gt; Scaled Type) -&gt; [Scaled Type] -&gt; [Scaled Type]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Scaled Type -&gt; Scaled Type
forall a. Type -&gt; Scaled a -&gt; Scaled a
</span><a href="GHC.Core.Multiplicity.html#scaleScaled"><span class="hs-identifier hs-var">scaleScaled</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829358"><span class="hs-identifier hs-var">arg_mult</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([Scaled Type] -&gt; [Scaled Type]) -&gt; [Scaled Type] -&gt; [Scaled Type]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [Type] -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dataConInstArgTys"><span class="hs-identifier hs-var">dataConInstArgTys</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829353"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829355"><span class="hs-identifier hs-var">tc_args</span></a></span><span>
</span><span id="line-1094"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">null</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">dataConExTyCoVars</span><span> </span><span class="hs-identifier">con</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-1095"></span><span>      </span><span class="hs-comment">-- Note [Unpacking GADTs and existentials]</span><span>
</span><span id="line-1096"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680829351"><span class="hs-identifier hs-var">rep_tys</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
-&gt; [StrictnessMark] -&gt; [(Scaled Type, StrictnessMark)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-operator hs-var">`zip`</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [StrictnessMark]
</span><a href="GHC.Core.DataCon.html#dataConRepStrictness"><span class="hs-identifier hs-var">dataConRepStrictness</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829353"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-1097"></span><span>    </span><span class="hs-special">,</span><span class="hs-special">(</span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621680829346"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829346"><span class="hs-identifier hs-var">arg_id</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1098"></span><span>       </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621680829345"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829345"><span class="hs-identifier hs-var">rep_ids</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Scaled Type -&gt; UniqSM Var) -&gt; [Scaled Type] -&gt; UniqSM [Var]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">Scaled Type -&gt; UniqSM Var
</span><a href="GHC.Types.Id.Make.html#newLocal"><span class="hs-identifier hs-var">newLocal</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680829351"><span class="hs-identifier hs-var">rep_tys</span></a></span><span>
</span><span id="line-1099"></span><span>          </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680829344"><span class="annot"><span class="annottext">r_mult :: Type
</span><a href="#local-6989586621680829344"><span class="hs-identifier hs-var hs-var">r_mult</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var -&gt; Type
</span><a href="GHC.Types.Id.html#idMult"><span class="hs-identifier hs-var">idMult</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829346"><span class="hs-identifier hs-var">arg_id</span></a></span><span>
</span><span id="line-1100"></span><span>          </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680829343"><span class="annot"><span class="annottext">rep_ids' :: [Var]
</span><a href="#local-6989586621680829343"><span class="hs-identifier hs-var hs-var">rep_ids'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Var -&gt; Var) -&gt; [Var] -&gt; [Var]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Var -&gt; Var
</span><a href="GHC.Types.Id.html#scaleIdBy"><span class="hs-identifier hs-var">scaleIdBy</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829344"><span class="hs-identifier hs-var">r_mult</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829345"><span class="hs-identifier hs-var">rep_ids</span></a></span><span>
</span><span id="line-1101"></span><span>          </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680829341"><span class="annot"><span class="annottext">unbox_fn :: CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621680829341"><span class="hs-identifier hs-var hs-var">unbox_fn</span></a></span></span><span> </span><span id="local-6989586621680829340"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829340"><span class="hs-identifier hs-var">body</span></a></span></span><span>
</span><span id="line-1102"></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; Var -&gt; AltCon -&gt; [Var] -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Core.Utils.html#mkSingleAltCase"><span class="hs-identifier hs-var">mkSingleAltCase</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; CoreExpr
forall b. Var -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829346"><span class="hs-identifier hs-var">arg_id</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829346"><span class="hs-identifier hs-var">arg_id</span></a></span><span>
</span><span id="line-1103"></span><span>                             </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; AltCon
</span><a href="GHC.Core.html#DataAlt"><span class="hs-identifier hs-var">DataAlt</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829353"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829343"><span class="hs-identifier hs-var">rep_ids'</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829340"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-1104"></span><span>          </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">([Var], CoreExpr -&gt; CoreExpr)
-&gt; UniqSM ([Var], CoreExpr -&gt; CoreExpr)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829345"><span class="hs-identifier hs-var">rep_ids</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr
</span><a href="#local-6989586621680829341"><span class="hs-identifier hs-var">unbox_fn</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-1105"></span><span>     </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(TCvSubst -&gt; UniqSM ([Var], CoreExpr)) -&gt; Boxer
</span><a href="GHC.Types.Id.Make.html#Boxer"><span class="hs-identifier hs-var">Boxer</span></a></span><span> </span><span class="annot"><span class="annottext">((TCvSubst -&gt; UniqSM ([Var], CoreExpr)) -&gt; Boxer)
-&gt; (TCvSubst -&gt; UniqSM ([Var], CoreExpr)) -&gt; Boxer
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621680829339"><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680829339"><span class="hs-identifier hs-var">subst</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1106"></span><span>       </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621680829338"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829338"><span class="hs-identifier hs-var">rep_ids</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Scaled Type -&gt; UniqSM Var) -&gt; [Scaled Type] -&gt; UniqSM [Var]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Scaled Type -&gt; UniqSM Var
</span><a href="GHC.Types.Id.Make.html#newLocal"><span class="hs-identifier hs-var">newLocal</span></a></span><span> </span><span class="annot"><span class="annottext">(Scaled Type -&gt; UniqSM Var)
-&gt; (Scaled Type -&gt; Scaled Type) -&gt; Scaled Type -&gt; UniqSM Var
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HasCallStack =&gt; TCvSubst -&gt; Scaled Type -&gt; Scaled Type
TCvSubst -&gt; Scaled Type -&gt; Scaled Type
</span><a href="GHC.Core.TyCo.Subst.html#substScaledTyUnchecked"><span class="hs-identifier hs-var">TcType.substScaledTyUnchecked</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680829339"><span class="hs-identifier hs-var">subst</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621680829351"><span class="hs-identifier hs-var">rep_tys</span></a></span><span>
</span><span id="line-1107"></span><span>          </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">([Var], CoreExpr) -&gt; UniqSM ([Var], CoreExpr)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829338"><span class="hs-identifier hs-var">rep_ids</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var -&gt; CoreExpr
forall b. Var -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; Var
</span><a href="GHC.Core.DataCon.html#dataConWorkId"><span class="hs-identifier hs-var">dataConWorkId</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829353"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1108"></span><span>                             </span><span class="annot"><span class="annottext">CoreExpr -&gt; [Type] -&gt; CoreExpr
forall b. Expr b -&gt; [Type] -&gt; Expr b
</span><a href="GHC.Core.html#mkTyApps"><span class="hs-operator hs-var">`mkTyApps`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TCvSubst -&gt; [Type] -&gt; [Type]
</span><a href="GHC.Core.TyCo.Subst.html#substTysUnchecked"><span class="hs-identifier hs-var">substTysUnchecked</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680829339"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829355"><span class="hs-identifier hs-var">tc_args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1109"></span><span>                             </span><span class="annot"><span class="annottext">CoreExpr -&gt; [Var] -&gt; CoreExpr
forall b. Expr b -&gt; [Var] -&gt; Expr b
</span><a href="GHC.Core.html#mkVarApps"><span class="hs-operator hs-var">`mkVarApps`</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829338"><span class="hs-identifier hs-var">rep_ids</span></a></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-1110"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-1111"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
-&gt; SDoc -&gt; ([(Scaled Type, StrictnessMark)], (Unboxer, Boxer))
forall a. HasCallStack =&gt; String -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dataConArgUnpack&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829357"><span class="hs-identifier hs-var">arg_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1112"></span><span>    </span><span class="hs-comment">-- An interface file specified Unpacked, but we couldn't unpack it</span><span>
</span><span id="line-1113"></span><span>
</span><span id="line-1114"></span><span class="annot"><a href="GHC.Types.Id.Make.html#isUnpackableType"><span class="hs-identifier hs-type">isUnpackableType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.FamInstEnv.html#FamInstEnvs"><span class="hs-identifier hs-type">FamInstEnvs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-1115"></span><span class="hs-comment">-- True if we can unpack the UNPACK the argument type</span><span>
</span><span id="line-1116"></span><span class="hs-comment">-- See Note [Recursive unboxing]</span><span>
</span><span id="line-1117"></span><span class="hs-comment">-- We look &quot;deeply&quot; inside rather than relying on the DataCons</span><span>
</span><span id="line-1118"></span><span class="hs-comment">-- we encounter on the way, because otherwise we might well</span><span>
</span><span id="line-1119"></span><span class="hs-comment">-- end up relying on ourselves!</span><span>
</span><span id="line-1120"></span><span id="isUnpackableType"><span class="annot"><span class="annottext">isUnpackableType :: DynFlags -&gt; FamInstEnvs -&gt; Type -&gt; Bool
</span><a href="GHC.Types.Id.Make.html#isUnpackableType"><span class="hs-identifier hs-var hs-var">isUnpackableType</span></a></span></span><span> </span><span id="local-6989586621680829335"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680829335"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680829334"><span class="annot"><span class="annottext">FamInstEnvs
</span><a href="#local-6989586621680829334"><span class="hs-identifier hs-var">fam_envs</span></a></span></span><span> </span><span id="local-6989586621680829333"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829333"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-1121"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680829332"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829332"><span class="hs-identifier hs-var">data_con</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Maybe DataCon
</span><a href="#local-6989586621680829331"><span class="hs-identifier hs-var">unpackable_type</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829333"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-1122"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; DataCon -&gt; Bool
</span><a href="#local-6989586621680829330"><span class="hs-identifier hs-var">ok_con_args</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829332"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-1123"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-1124"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1125"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1126"></span><span>    </span><span id="local-6989586621680829330"><span class="annot"><span class="annottext">ok_con_args :: NameSet -&gt; DataCon -&gt; Bool
</span><a href="#local-6989586621680829330"><span class="hs-identifier hs-var hs-var">ok_con_args</span></a></span></span><span> </span><span id="local-6989586621680829327"><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680829327"><span class="hs-identifier hs-var">dcs</span></a></span></span><span> </span><span id="local-6989586621680829326"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829326"><span class="hs-identifier hs-var">con</span></a></span></span><span>
</span><span id="line-1127"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829325"><span class="hs-identifier hs-var">dc_name</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; NameSet -&gt; Bool
</span><a href="GHC.Types.Name.Set.html#elemNameSet"><span class="hs-operator hs-var">`elemNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680829327"><span class="hs-identifier hs-var">dcs</span></a></span><span>
</span><span id="line-1128"></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1129"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-1130"></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((Scaled Type, HsSrcBang) -&gt; Bool)
-&gt; [(Scaled Type, HsSrcBang)] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#all"><span class="hs-identifier hs-var">all</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NameSet -&gt; (Scaled Type, HsSrcBang) -&gt; Bool
</span><a href="#local-6989586621680829322"><span class="hs-identifier hs-var">ok_arg</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680829321"><span class="hs-identifier hs-var">dcs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1131"></span><span>             </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; [Scaled Type]
</span><a href="GHC.Core.DataCon.html#dataConOrigArgTys"><span class="hs-identifier hs-var">dataConOrigArgTys</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829326"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">[Scaled Type] -&gt; [HsSrcBang] -&gt; [(Scaled Type, HsSrcBang)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-operator hs-var">`zip`</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [HsSrcBang]
</span><a href="GHC.Core.DataCon.html#dataConSrcBangs"><span class="hs-identifier hs-var">dataConSrcBangs</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829326"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1132"></span><span>          </span><span class="hs-comment">-- NB: dataConSrcBangs gives the *user* request;</span><span>
</span><span id="line-1133"></span><span>          </span><span class="hs-comment">-- We'd get a black hole if we used dataConImplBangs</span><span>
</span><span id="line-1134"></span><span>       </span><span class="hs-keyword">where</span><span>
</span><span id="line-1135"></span><span>         </span><span id="local-6989586621680829325"><span class="annot"><span class="annottext">dc_name :: Name
</span><a href="#local-6989586621680829325"><span class="hs-identifier hs-var hs-var">dc_name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829326"><span class="hs-identifier hs-var">con</span></a></span><span>
</span><span id="line-1136"></span><span>         </span><span id="local-6989586621680829321"><span class="annot"><span class="annottext">dcs' :: NameSet
</span><a href="#local-6989586621680829321"><span class="hs-identifier hs-var hs-var">dcs'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680829327"><span class="hs-identifier hs-var">dcs</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; Name -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#extendNameSet"><span class="hs-operator hs-var">`extendNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829325"><span class="hs-identifier hs-var">dc_name</span></a></span><span>
</span><span id="line-1137"></span><span>
</span><span id="line-1138"></span><span>    </span><span id="local-6989586621680829322"><span class="annot"><span class="annottext">ok_arg :: NameSet -&gt; (Scaled Type, HsSrcBang) -&gt; Bool
</span><a href="#local-6989586621680829322"><span class="hs-identifier hs-var hs-var">ok_arg</span></a></span></span><span> </span><span id="local-6989586621680829315"><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680829315"><span class="hs-identifier hs-var">dcs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680829314"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829314"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829313"><span class="annot"><span class="annottext">HsSrcBang
</span><a href="#local-6989586621680829313"><span class="hs-identifier hs-var">bang</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-1139"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HsSrcBang -&gt; Bool
</span><a href="#local-6989586621680829312"><span class="hs-identifier hs-var">attempt_unpack</span></a></span><span> </span><span class="annot"><span class="annottext">HsSrcBang
</span><a href="#local-6989586621680829313"><span class="hs-identifier hs-var">bang</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; Type -&gt; Bool
</span><a href="#local-6989586621680829311"><span class="hs-identifier hs-var">ok_ty</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680829315"><span class="hs-identifier hs-var">dcs</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829310"><span class="hs-identifier hs-var">norm_ty</span></a></span><span>
</span><span id="line-1140"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-1141"></span><span>        </span><span id="local-6989586621680829310"><span class="annot"><span class="annottext">norm_ty :: Type
</span><a href="#local-6989586621680829310"><span class="hs-identifier hs-var hs-var">norm_ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FamInstEnvs -&gt; Type -&gt; Type
</span><a href="GHC.Core.FamInstEnv.html#topNormaliseType"><span class="hs-identifier hs-var">topNormaliseType</span></a></span><span> </span><span class="annot"><span class="annottext">FamInstEnvs
</span><a href="#local-6989586621680829334"><span class="hs-identifier hs-var">fam_envs</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829314"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-1142"></span><span>
</span><span id="line-1143"></span><span>    </span><span id="local-6989586621680829311"><span class="annot"><span class="annottext">ok_ty :: NameSet -&gt; Type -&gt; Bool
</span><a href="#local-6989586621680829311"><span class="hs-identifier hs-var hs-var">ok_ty</span></a></span></span><span> </span><span id="local-6989586621680829308"><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680829308"><span class="hs-identifier hs-var">dcs</span></a></span></span><span> </span><span id="local-6989586621680829307"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829307"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-1144"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680829306"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829306"><span class="hs-identifier hs-var">data_con</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Maybe DataCon
</span><a href="#local-6989586621680829331"><span class="hs-identifier hs-var">unpackable_type</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829307"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-1145"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; DataCon -&gt; Bool
</span><a href="#local-6989586621680829330"><span class="hs-identifier hs-var">ok_con_args</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680829308"><span class="hs-identifier hs-var">dcs</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829306"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-1146"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-1147"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>        </span><span class="hs-comment">-- NB True here, in contrast to False at top level</span><span>
</span><span id="line-1148"></span><span>
</span><span id="line-1149"></span><span>    </span><span id="local-6989586621680829312"><span class="annot"><span class="annottext">attempt_unpack :: HsSrcBang -&gt; Bool
</span><a href="#local-6989586621680829312"><span class="hs-identifier hs-var hs-var">attempt_unpack</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#HsSrcBang"><span class="hs-identifier hs-type">HsSrcBang</span></a></span><span> </span><span class="annot"><span class="annottext">SourceText
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="GHC.Core.DataCon.html#SrcUnpack"><span class="hs-identifier hs-var">SrcUnpack</span></a></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="GHC.Core.DataCon.html#NoSrcStrict"><span class="hs-identifier hs-var">NoSrcStrict</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1150"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#xopt"><span class="hs-identifier hs-var">xopt</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#StrictData"><span class="hs-identifier hs-var">LangExt.StrictData</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680829335"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-1151"></span><span>    </span><span class="annot"><a href="#local-6989586621680829312"><span class="hs-identifier hs-var">attempt_unpack</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#HsSrcBang"><span class="hs-identifier hs-type">HsSrcBang</span></a></span><span> </span><span class="annot"><span class="annottext">SourceText
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="GHC.Core.DataCon.html#SrcUnpack"><span class="hs-identifier hs-var">SrcUnpack</span></a></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="GHC.Core.DataCon.html#SrcStrict"><span class="hs-identifier hs-var">SrcStrict</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1152"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-1153"></span><span>    </span><span class="annot"><a href="#local-6989586621680829312"><span class="hs-identifier hs-var">attempt_unpack</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#HsSrcBang"><span class="hs-identifier hs-type">HsSrcBang</span></a></span><span> </span><span class="annot"><span class="annottext">SourceText
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="GHC.Core.DataCon.html#NoSrcUnpack"><span class="hs-identifier hs-var">NoSrcUnpack</span></a></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="GHC.Core.DataCon.html#SrcStrict"><span class="hs-identifier hs-var">SrcStrict</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1154"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-comment">-- Be conservative</span><span>
</span><span id="line-1155"></span><span>    </span><span class="annot"><a href="#local-6989586621680829312"><span class="hs-identifier hs-var">attempt_unpack</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.DataCon.html#HsSrcBang"><span class="hs-identifier hs-type">HsSrcBang</span></a></span><span> </span><span class="annot"><span class="annottext">SourceText
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">SrcUnpackedness
</span><a href="GHC.Core.DataCon.html#NoSrcUnpack"><span class="hs-identifier hs-var">NoSrcUnpack</span></a></span><span> </span><span class="annot"><span class="annottext">SrcStrictness
</span><a href="GHC.Core.DataCon.html#NoSrcStrict"><span class="hs-identifier hs-var">NoSrcStrict</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1156"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#xopt"><span class="hs-identifier hs-var">xopt</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="../../ghc-boot-th/src/GHC.LanguageExtensions.Type.html#StrictData"><span class="hs-identifier hs-var">LangExt.StrictData</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680829335"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-comment">-- Be conservative</span><span>
</span><span id="line-1157"></span><span>    </span><span class="annot"><a href="#local-6989586621680829312"><span class="hs-identifier hs-var">attempt_unpack</span></a></span><span> </span><span class="annot"><span class="annottext">HsSrcBang
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-1158"></span><span>
</span><span id="line-1159"></span><span>    </span><span class="annot"><a href="#local-6989586621680829331"><span class="hs-identifier hs-type">unpackable_type</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span>
</span><span id="line-1160"></span><span>    </span><span class="hs-comment">-- Works just on a single level</span><span>
</span><span id="line-1161"></span><span>    </span><span id="local-6989586621680829331"><span class="annot"><span class="annottext">unpackable_type :: Type -&gt; Maybe DataCon
</span><a href="#local-6989586621680829331"><span class="hs-identifier hs-var hs-var">unpackable_type</span></a></span></span><span> </span><span id="local-6989586621680829304"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829304"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-1162"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680829303"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829303"><span class="hs-identifier hs-var">tc</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Type -&gt; Maybe (TyCon, [Type])
Type -&gt; Maybe (TyCon, [Type])
</span><a href="GHC.Core.Type.html#splitTyConApp_maybe"><span class="hs-identifier hs-var">splitTyConApp_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829304"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-1163"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680829302"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829302"><span class="hs-identifier hs-var">data_con</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Maybe DataCon
</span><a href="GHC.Core.TyCon.html#tyConSingleAlgDataCon_maybe"><span class="hs-identifier hs-var">tyConSingleAlgDataCon_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829303"><span class="hs-identifier hs-var">tc</span></a></span><span>
</span><span id="line-1164"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; [Var]
</span><a href="GHC.Core.DataCon.html#dataConExTyCoVars"><span class="hs-identifier hs-var">dataConExTyCoVars</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829302"><span class="hs-identifier hs-var">data_con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1165"></span><span>          </span><span class="hs-comment">-- See Note [Unpacking GADTs and existentials]</span><span>
</span><span id="line-1166"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Maybe DataCon
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621680829302"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-1167"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-1168"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe DataCon
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-1169"></span><span>
</span><span id="line-1170"></span><span class="hs-comment">{-
Note [Unpacking GADTs and existentials]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There is nothing stopping us unpacking a data type with equality
components, like
  data Equal a b where
    Equal :: Equal a a

And it'd be fine to unpack a product type with existential components
too, but that would require a bit more plumbing, so currently we don't.

So for now we require: null (dataConExTyCoVars data_con)
See #14978

Note [Unpack one-wide fields]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The flag UnboxSmallStrictFields ensures that any field that can
(safely) be unboxed to a word-sized unboxed field, should be so unboxed.
For example:

    data A = A Int#
    newtype B = B A
    data C = C !B
    data D = D !C
    data E = E !()
    data F = F !D
    data G = G !F !F

All of these should have an Int# as their representation, except
G which should have two Int#s.

However

    data T = T !(S Int)
    data S = S !a

Here we can represent T with an Int#.

Note [Recursive unboxing]
~~~~~~~~~~~~~~~~~~~~~~~~~
Consider
  data R = MkR {-# UNPACK #-} !S Int
  data S = MkS {-# UNPACK #-} !Int
The representation arguments of MkR are the *representation* arguments
of S (plus Int); the rep args of MkS are Int#.  This is all fine.

But be careful not to try to unbox this!
        data T = MkT {-# UNPACK #-} !T Int
Because then we'd get an infinite number of arguments.

Here is a more complicated case:
        data S = MkS {-# UNPACK #-} !T Int
        data T = MkT {-# UNPACK #-} !S Int
Each of S and T must decide independently whether to unpack
and they had better not both say yes. So they must both say no.

Also behave conservatively when there is no UNPACK pragma
        data T = MkS !T Int
with -funbox-strict-fields or -funbox-small-strict-fields
we need to behave as if there was an UNPACK pragma there.

But it's the *argument* type that matters. This is fine:
        data S = MkS S !Int
because Int is non-recursive.

************************************************************************
*                                                                      *
        Wrapping and unwrapping newtypes and type families
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-1241"></span><span>
</span><span id="line-1242"></span><span class="annot"><a href="GHC.Types.Id.Make.html#wrapNewTypeBody"><span class="hs-identifier hs-type">wrapNewTypeBody</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-1243"></span><span class="hs-comment">-- The wrapper for the data constructor for a newtype looks like this:</span><span>
</span><span id="line-1244"></span><span class="hs-comment">--      newtype T a = MkT (a,Int)</span><span>
</span><span id="line-1245"></span><span class="hs-comment">--      MkT :: forall a. (a,Int) -&gt; T a</span><span>
</span><span id="line-1246"></span><span class="hs-comment">--      MkT = /\a. \(x:(a,Int)). x `cast` sym (CoT a)</span><span>
</span><span id="line-1247"></span><span class="hs-comment">-- where CoT is the coercion TyCon associated with the newtype</span><span>
</span><span id="line-1248"></span><span class="hs-comment">--</span><span>
</span><span id="line-1249"></span><span class="hs-comment">-- The call (wrapNewTypeBody T [a] e) returns the</span><span>
</span><span id="line-1250"></span><span class="hs-comment">-- body of the wrapper, namely</span><span>
</span><span id="line-1251"></span><span class="hs-comment">--      e `cast` (CoT [a])</span><span>
</span><span id="line-1252"></span><span class="hs-comment">--</span><span>
</span><span id="line-1253"></span><span class="hs-comment">-- If a coercion constructor is provided in the newtype, then we use</span><span>
</span><span id="line-1254"></span><span class="hs-comment">-- it, otherwise the wrap/unwrap are both no-ops</span><span>
</span><span id="line-1255"></span><span>
</span><span id="line-1256"></span><span id="wrapNewTypeBody"><span class="annot"><span class="annottext">wrapNewTypeBody :: TyCon -&gt; [Type] -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Types.Id.Make.html#wrapNewTypeBody"><span class="hs-identifier hs-var hs-var">wrapNewTypeBody</span></a></span></span><span> </span><span id="local-6989586621680829301"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829301"><span class="hs-identifier hs-var">tycon</span></a></span></span><span> </span><span id="local-6989586621680829300"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829300"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span id="local-6989586621680829299"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829299"><span class="hs-identifier hs-var">result_expr</span></a></span></span><span>
</span><span id="line-1257"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isNewTyCon</span><span> </span><span class="hs-identifier">tycon</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-1258"></span><span>    </span><span class="annot"><span class="annottext">CoreExpr -&gt; Coercion -&gt; CoreExpr
</span><a href="GHC.Core.Utils.html#mkCast"><span class="hs-identifier hs-var">mkCast</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829299"><span class="hs-identifier hs-var">result_expr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Coercion -&gt; Coercion
</span><a href="GHC.Core.Coercion.html#mkSymCo"><span class="hs-identifier hs-var">mkSymCo</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680829298"><span class="hs-identifier hs-var">co</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1259"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1260"></span><span>    </span><span id="local-6989586621680829298"><span class="annot"><span class="annottext">co :: Coercion
</span><a href="#local-6989586621680829298"><span class="hs-identifier hs-var hs-var">co</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Role -&gt; CoAxiom Unbranched -&gt; [Type] -&gt; [Coercion] -&gt; Coercion
</span><a href="GHC.Core.Coercion.html#mkUnbranchedAxInstCo"><span class="hs-identifier hs-var">mkUnbranchedAxInstCo</span></a></span><span> </span><span class="annot"><span class="annottext">Role
</span><a href="GHC.Core.Coercion.Axiom.html#Representational"><span class="hs-identifier hs-var">Representational</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; CoAxiom Unbranched
</span><a href="GHC.Core.TyCon.html#newTyConCo"><span class="hs-identifier hs-var">newTyConCo</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829301"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829300"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-1261"></span><span>
</span><span id="line-1262"></span><span class="hs-comment">-- When unwrapping, we do *not* apply any family coercion, because this will</span><span>
</span><span id="line-1263"></span><span class="hs-comment">-- be done via a CoPat by the type checker.  We have to do it this way as</span><span>
</span><span id="line-1264"></span><span class="hs-comment">-- computing the right type arguments for the coercion requires more than just</span><span>
</span><span id="line-1265"></span><span class="hs-comment">-- a splitting operation (cf, GHC.Tc.Gen.Pat.tcConPat).</span><span>
</span><span id="line-1266"></span><span>
</span><span id="line-1267"></span><span class="annot"><a href="GHC.Types.Id.Make.html#unwrapNewTypeBody"><span class="hs-identifier hs-type">unwrapNewTypeBody</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-1268"></span><span id="unwrapNewTypeBody"><span class="annot"><span class="annottext">unwrapNewTypeBody :: TyCon -&gt; [Type] -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Types.Id.Make.html#unwrapNewTypeBody"><span class="hs-identifier hs-var hs-var">unwrapNewTypeBody</span></a></span></span><span> </span><span id="local-6989586621680829294"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829294"><span class="hs-identifier hs-var">tycon</span></a></span></span><span> </span><span id="local-6989586621680829293"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829293"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span id="local-6989586621680829292"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829292"><span class="hs-identifier hs-var">result_expr</span></a></span></span><span>
</span><span id="line-1269"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isNewTyCon</span><span> </span><span class="hs-identifier">tycon</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-1270"></span><span>    </span><span class="annot"><span class="annottext">CoreExpr -&gt; Coercion -&gt; CoreExpr
</span><a href="GHC.Core.Utils.html#mkCast"><span class="hs-identifier hs-var">mkCast</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829292"><span class="hs-identifier hs-var">result_expr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Role -&gt; CoAxiom Unbranched -&gt; [Type] -&gt; [Coercion] -&gt; Coercion
</span><a href="GHC.Core.Coercion.html#mkUnbranchedAxInstCo"><span class="hs-identifier hs-var">mkUnbranchedAxInstCo</span></a></span><span> </span><span class="annot"><span class="annottext">Role
</span><a href="GHC.Core.Coercion.Axiom.html#Representational"><span class="hs-identifier hs-var">Representational</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; CoAxiom Unbranched
</span><a href="GHC.Core.TyCon.html#newTyConCo"><span class="hs-identifier hs-var">newTyConCo</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829294"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829293"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-1271"></span><span>
</span><span id="line-1272"></span><span class="hs-comment">-- If the type constructor is a representation type of a data instance, wrap</span><span>
</span><span id="line-1273"></span><span class="hs-comment">-- the expression into a cast adjusting the expression type, which is an</span><span>
</span><span id="line-1274"></span><span class="hs-comment">-- instance of the representation type, to the corresponding instance of the</span><span>
</span><span id="line-1275"></span><span class="hs-comment">-- family instance type.</span><span>
</span><span id="line-1276"></span><span class="hs-comment">-- See Note [Wrappers for data instance tycons]</span><span>
</span><span id="line-1277"></span><span class="annot"><a href="GHC.Types.Id.Make.html#wrapFamInstBody"><span class="hs-identifier hs-type">wrapFamInstBody</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-1278"></span><span id="wrapFamInstBody"><span class="annot"><span class="annottext">wrapFamInstBody :: TyCon -&gt; [Type] -&gt; CoreExpr -&gt; CoreExpr
</span><a href="GHC.Types.Id.Make.html#wrapFamInstBody"><span class="hs-identifier hs-var hs-var">wrapFamInstBody</span></a></span></span><span> </span><span id="local-6989586621680829291"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829291"><span class="hs-identifier hs-var">tycon</span></a></span></span><span> </span><span id="local-6989586621680829290"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829290"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span id="local-6989586621680829289"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829289"><span class="hs-identifier hs-var">body</span></a></span></span><span>
</span><span id="line-1279"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680829288"><span class="annot"><span class="annottext">CoAxiom Unbranched
</span><a href="#local-6989586621680829288"><span class="hs-identifier hs-var">co_con</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Maybe (CoAxiom Unbranched)
</span><a href="GHC.Core.TyCon.html#tyConFamilyCoercion_maybe"><span class="hs-identifier hs-var">tyConFamilyCoercion_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680829291"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-1280"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; Coercion -&gt; CoreExpr
</span><a href="GHC.Core.Utils.html#mkCast"><span class="hs-identifier hs-var">mkCast</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829289"><span class="hs-identifier hs-var">body</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Coercion -&gt; Coercion
</span><a href="GHC.Core.Coercion.html#mkSymCo"><span class="hs-identifier hs-var">mkSymCo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Role -&gt; CoAxiom Unbranched -&gt; [Type] -&gt; [Coercion] -&gt; Coercion
</span><a href="GHC.Core.Coercion.html#mkUnbranchedAxInstCo"><span class="hs-identifier hs-var">mkUnbranchedAxInstCo</span></a></span><span> </span><span class="annot"><span class="annottext">Role
</span><a href="GHC.Core.Coercion.Axiom.html#Representational"><span class="hs-identifier hs-var">Representational</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxiom Unbranched
</span><a href="#local-6989586621680829288"><span class="hs-identifier hs-var">co_con</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829290"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1281"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-1282"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829289"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-1283"></span><span>
</span><span id="line-1284"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Primitive operations}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-1291"></span><span>
</span><span id="line-1292"></span><span class="annot"><a href="GHC.Types.Id.Make.html#mkPrimOpId"><span class="hs-identifier hs-type">mkPrimOpId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Builtin.PrimOps.html#PrimOp"><span class="hs-identifier hs-type">PrimOp</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-1293"></span><span id="mkPrimOpId"><span class="annot"><span class="annottext">mkPrimOpId :: PrimOp -&gt; Var
</span><a href="GHC.Types.Id.Make.html#mkPrimOpId"><span class="hs-identifier hs-var hs-var">mkPrimOpId</span></a></span></span><span> </span><span id="local-6989586621680829286"><span class="annot"><span class="annottext">PrimOp
</span><a href="#local-6989586621680829286"><span class="hs-identifier hs-var">prim_op</span></a></span></span><span>
</span><span id="line-1294"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829285"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-1295"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1296"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680829284"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829284"><span class="hs-identifier hs-var">tyvars</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680829283"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829283"><span class="hs-identifier hs-var">arg_tys</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680829282"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829282"><span class="hs-identifier hs-var">res_ty</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829281"><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829281"><span class="hs-identifier hs-var">arity</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829280"><span class="annot"><span class="annottext">StrictSig
</span><a href="#local-6989586621680829280"><span class="hs-identifier hs-var">strict_sig</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PrimOp -&gt; ([Var], [Type], Type, Arity, StrictSig)
</span><a href="GHC.Builtin.PrimOps.html#primOpSig"><span class="hs-identifier hs-var">primOpSig</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp
</span><a href="#local-6989586621680829286"><span class="hs-identifier hs-var">prim_op</span></a></span><span>
</span><span id="line-1297"></span><span>    </span><span id="local-6989586621680829278"><span class="annot"><span class="annottext">ty :: Type
</span><a href="#local-6989586621680829278"><span class="hs-identifier hs-var hs-var">ty</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; Type -&gt; Type
</span><a href="GHC.Core.Type.html#mkSpecForAllTys"><span class="hs-identifier hs-var">mkSpecForAllTys</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829284"><span class="hs-identifier hs-var">tyvars</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Type] -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkVisFunTysMany"><span class="hs-identifier hs-var">mkVisFunTysMany</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829283"><span class="hs-identifier hs-var">arg_tys</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829282"><span class="hs-identifier hs-var">res_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1298"></span><span>    </span><span id="local-6989586621680829275"><span class="annot"><span class="annottext">name :: Name
</span><a href="#local-6989586621680829275"><span class="hs-identifier hs-var hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; OccName -&gt; Unique -&gt; TyThing -&gt; BuiltInSyntax -&gt; Name
</span><a href="GHC.Types.Name.html#mkWiredInName"><span class="hs-identifier hs-var">mkWiredInName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="GHC.Builtin.Names.html#gHC_PRIM"><span class="hs-identifier hs-var">gHC_PRIM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PrimOp -&gt; OccName
</span><a href="GHC.Builtin.PrimOps.html#primOpOcc"><span class="hs-identifier hs-var">primOpOcc</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp
</span><a href="#local-6989586621680829286"><span class="hs-identifier hs-var">prim_op</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1299"></span><span>                         </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Arity -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkPrimOpIdUnique"><span class="hs-identifier hs-var">mkPrimOpIdUnique</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PrimOp -&gt; Arity
</span><a href="GHC.Builtin.PrimOps.html#primOpTag"><span class="hs-identifier hs-var">primOpTag</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp
</span><a href="#local-6989586621680829286"><span class="hs-identifier hs-var">prim_op</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1300"></span><span>                         </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; TyThing
</span><a href="GHC.Core.TyCo.Rep.html#AnId"><span class="hs-identifier hs-var">AnId</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829285"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">BuiltInSyntax
</span><a href="GHC.Types.Name.html#UserSyntax"><span class="hs-identifier hs-var">UserSyntax</span></a></span><span>
</span><span id="line-1301"></span><span>    </span><span id="local-6989586621680829285"><span class="annot"><span class="annottext">id :: Var
</span><a href="#local-6989586621680829285"><span class="hs-identifier hs-var hs-var">id</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdDetails -&gt; Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.html#mkGlobalId"><span class="hs-identifier hs-var">mkGlobalId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PrimOp -&gt; IdDetails
</span><a href="GHC.Types.Id.Info.html#PrimOpId"><span class="hs-identifier hs-var">PrimOpId</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp
</span><a href="#local-6989586621680829286"><span class="hs-identifier hs-var">prim_op</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829275"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829278"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680829266"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-1302"></span><span>
</span><span id="line-1303"></span><span>    </span><span class="hs-comment">-- PrimOps don't ever construct a product, but we want to preserve bottoms</span><span>
</span><span id="line-1304"></span><span>    </span><span id="local-6989586621680829265"><span class="annot"><span class="annottext">cpr :: CprResult
</span><a href="#local-6989586621680829265"><span class="hs-identifier hs-var hs-var">cpr</span></a></span></span><span>
</span><span id="line-1305"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Divergence -&gt; Bool
</span><a href="GHC.Types.Demand.html#isDeadEndDiv"><span class="hs-identifier hs-var">isDeadEndDiv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">([Demand], Divergence) -&gt; Divergence
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">StrictSig -&gt; ([Demand], Divergence)
</span><a href="GHC.Types.Demand.html#splitStrictSig"><span class="hs-identifier hs-var">splitStrictSig</span></a></span><span> </span><span class="annot"><span class="annottext">StrictSig
</span><a href="#local-6989586621680829280"><span class="hs-identifier hs-var">strict_sig</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CprResult
</span><a href="GHC.Types.Cpr.html#botCpr"><span class="hs-identifier hs-var">botCpr</span></a></span><span>
</span><span id="line-1306"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                                      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CprResult
</span><a href="GHC.Types.Cpr.html#topCpr"><span class="hs-identifier hs-var">topCpr</span></a></span><span>
</span><span id="line-1307"></span><span>
</span><span id="line-1308"></span><span>    </span><span id="local-6989586621680829266"><span class="annot"><span class="annottext">info :: IdInfo
</span><a href="#local-6989586621680829266"><span class="hs-identifier hs-var hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#noCafIdInfo"><span class="hs-identifier hs-var">noCafIdInfo</span></a></span><span>
</span><span id="line-1309"></span><span>           </span><span class="annot"><span class="annottext">IdInfo -&gt; RuleInfo -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setRuleInfo"><span class="hs-operator hs-var">`setRuleInfo`</span></a></span><span>           </span><span class="annot"><span class="annottext">[CoreRule] -&gt; RuleInfo
</span><a href="GHC.Core.FVs.html#mkRuleInfo"><span class="hs-identifier hs-var">mkRuleInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe CoreRule -&gt; [CoreRule]
forall a. Maybe a -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#maybeToList"><span class="hs-identifier hs-var">maybeToList</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe CoreRule -&gt; [CoreRule]) -&gt; Maybe CoreRule -&gt; [CoreRule]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; PrimOp -&gt; Maybe CoreRule
</span><a href="GHC.Core.Opt.ConstantFold.html#primOpRules"><span class="hs-identifier hs-var">primOpRules</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829275"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">PrimOp
</span><a href="#local-6989586621680829286"><span class="hs-identifier hs-var">prim_op</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1310"></span><span>           </span><span class="annot"><span class="annottext">IdInfo -&gt; Arity -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setArityInfo"><span class="hs-operator hs-var">`setArityInfo`</span></a></span><span>          </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829281"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-1311"></span><span>           </span><span class="annot"><span class="annottext">IdInfo -&gt; StrictSig -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setStrictnessInfo"><span class="hs-operator hs-var">`setStrictnessInfo`</span></a></span><span>     </span><span class="annot"><span class="annottext">StrictSig
</span><a href="#local-6989586621680829280"><span class="hs-identifier hs-var">strict_sig</span></a></span><span>
</span><span id="line-1312"></span><span>           </span><span class="annot"><span class="annottext">IdInfo -&gt; CprSig -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setCprInfo"><span class="hs-operator hs-var">`setCprInfo`</span></a></span><span>            </span><span class="annot"><span class="annottext">Arity -&gt; CprResult -&gt; CprSig
</span><a href="GHC.Types.Cpr.html#mkCprSig"><span class="hs-identifier hs-var">mkCprSig</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829281"><span class="hs-identifier hs-var">arity</span></a></span><span> </span><span class="annot"><span class="annottext">CprResult
</span><a href="#local-6989586621680829265"><span class="hs-identifier hs-var">cpr</span></a></span><span>
</span><span id="line-1313"></span><span>           </span><span class="annot"><span class="annottext">IdInfo -&gt; InlinePragma -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setInlinePragInfo"><span class="hs-operator hs-var">`setInlinePragInfo`</span></a></span><span>     </span><span class="annot"><span class="annottext">InlinePragma
</span><a href="GHC.Types.Basic.html#neverInlinePragma"><span class="hs-identifier hs-var">neverInlinePragma</span></a></span><span>
</span><span id="line-1314"></span><span>           </span><span class="annot"><span class="annottext">IdInfo -&gt; Type -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setLevityInfoWithType"><span class="hs-operator hs-var">`setLevityInfoWithType`</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829282"><span class="hs-identifier hs-var">res_ty</span></a></span><span>
</span><span id="line-1315"></span><span>               </span><span class="hs-comment">-- We give PrimOps a NOINLINE pragma so that we don't</span><span>
</span><span id="line-1316"></span><span>               </span><span class="hs-comment">-- get silly warnings from Desugar.dsRule (the inline_shadows_rule</span><span>
</span><span id="line-1317"></span><span>               </span><span class="hs-comment">-- test) about a RULE conflicting with a possible inlining</span><span>
</span><span id="line-1318"></span><span>               </span><span class="hs-comment">-- cf #7287</span><span>
</span><span id="line-1319"></span><span>
</span><span id="line-1320"></span><span class="hs-comment">-- For each ccall we manufacture a separate CCallOpId, giving it</span><span>
</span><span id="line-1321"></span><span class="hs-comment">-- a fresh unique, a type that is correct for this particular ccall,</span><span>
</span><span id="line-1322"></span><span class="hs-comment">-- and a CCall structure that gives the correct details about calling</span><span>
</span><span id="line-1323"></span><span class="hs-comment">-- convention etc.</span><span>
</span><span id="line-1324"></span><span class="hs-comment">--</span><span>
</span><span id="line-1325"></span><span class="hs-comment">-- The *name* of this Id is a local name whose OccName gives the full</span><span>
</span><span id="line-1326"></span><span class="hs-comment">-- details of the ccall, type and all.  This means that the interface</span><span>
</span><span id="line-1327"></span><span class="hs-comment">-- file reader can reconstruct a suitable Id</span><span>
</span><span id="line-1328"></span><span>
</span><span id="line-1329"></span><span class="annot"><a href="GHC.Types.Id.Make.html#mkFCallId"><span class="hs-identifier hs-type">mkFCallId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.ForeignCall.html#ForeignCall"><span class="hs-identifier hs-type">ForeignCall</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-1330"></span><span id="mkFCallId"><span class="annot"><span class="annottext">mkFCallId :: DynFlags -&gt; Unique -&gt; ForeignCall -&gt; Type -&gt; Var
</span><a href="GHC.Types.Id.Make.html#mkFCallId"><span class="hs-identifier hs-var hs-var">mkFCallId</span></a></span></span><span> </span><span id="local-6989586621680829259"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680829259"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680829258"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680829258"><span class="hs-identifier hs-var">uniq</span></a></span></span><span> </span><span id="local-6989586621680829257"><span class="annot"><span class="annottext">ForeignCall
</span><a href="#local-6989586621680829257"><span class="hs-identifier hs-var">fcall</span></a></span></span><span> </span><span id="local-6989586621680829256"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829256"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-1331"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">noFreeVarsOfType</span><span> </span><span class="hs-identifier">ty</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-1332"></span><span>    </span><span class="hs-comment">-- A CCallOpId should have no free type variables;</span><span>
</span><span id="line-1333"></span><span>    </span><span class="hs-comment">-- when doing substitutions won't substitute over it</span><span>
</span><span id="line-1334"></span><span>    </span><span class="annot"><span class="annottext">IdDetails -&gt; Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.html#mkGlobalId"><span class="hs-identifier hs-var">mkGlobalId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ForeignCall -&gt; IdDetails
</span><a href="GHC.Types.Id.Info.html#FCallId"><span class="hs-identifier hs-var">FCallId</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignCall
</span><a href="#local-6989586621680829257"><span class="hs-identifier hs-var">fcall</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829253"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829256"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680829252"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-1335"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1336"></span><span>    </span><span id="local-6989586621680829248"><span class="annot"><span class="annottext">occ_str :: String
</span><a href="#local-6989586621680829248"><span class="hs-identifier hs-var hs-var">occ_str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; SDoc -&gt; String
</span><a href="GHC.Utils.Outputable.html#showSDoc"><span class="hs-identifier hs-var">showSDoc</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680829259"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#braces"><span class="hs-identifier hs-var">braces</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ForeignCall -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignCall
</span><a href="#local-6989586621680829257"><span class="hs-identifier hs-var">fcall</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829256"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1337"></span><span>    </span><span class="hs-comment">-- The &quot;occurrence name&quot; of a ccall is the full info about the</span><span>
</span><span id="line-1338"></span><span>    </span><span class="hs-comment">-- ccall; it is encoded, but may have embedded spaces etc!</span><span>
</span><span id="line-1339"></span><span>
</span><span id="line-1340"></span><span>    </span><span id="local-6989586621680829253"><span class="annot"><span class="annottext">name :: Name
</span><a href="#local-6989586621680829253"><span class="hs-identifier hs-var hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Unique -&gt; String -&gt; Name
</span><a href="GHC.Types.Name.html#mkFCallName"><span class="hs-identifier hs-var">mkFCallName</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621680829258"><span class="hs-identifier hs-var">uniq</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680829248"><span class="hs-identifier hs-var">occ_str</span></a></span><span>
</span><span id="line-1341"></span><span>
</span><span id="line-1342"></span><span>    </span><span id="local-6989586621680829252"><span class="annot"><span class="annottext">info :: IdInfo
</span><a href="#local-6989586621680829252"><span class="hs-identifier hs-var hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#noCafIdInfo"><span class="hs-identifier hs-var">noCafIdInfo</span></a></span><span>
</span><span id="line-1343"></span><span>           </span><span class="annot"><span class="annottext">IdInfo -&gt; Arity -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setArityInfo"><span class="hs-operator hs-var">`setArityInfo`</span></a></span><span>          </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829243"><span class="hs-identifier hs-var">arity</span></a></span><span>
</span><span id="line-1344"></span><span>           </span><span class="annot"><span class="annottext">IdInfo -&gt; StrictSig -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setStrictnessInfo"><span class="hs-operator hs-var">`setStrictnessInfo`</span></a></span><span>     </span><span class="annot"><span class="annottext">StrictSig
</span><a href="#local-6989586621680829242"><span class="hs-identifier hs-var">strict_sig</span></a></span><span>
</span><span id="line-1345"></span><span>           </span><span class="annot"><span class="annottext">IdInfo -&gt; CprSig -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setCprInfo"><span class="hs-operator hs-var">`setCprInfo`</span></a></span><span>            </span><span class="annot"><span class="annottext">CprSig
</span><a href="GHC.Types.Cpr.html#topCprSig"><span class="hs-identifier hs-var">topCprSig</span></a></span><span>
</span><span id="line-1346"></span><span>           </span><span class="annot"><span class="annottext">IdInfo -&gt; Type -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setLevityInfoWithType"><span class="hs-operator hs-var">`setLevityInfoWithType`</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829256"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-1347"></span><span>
</span><span id="line-1348"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680829241"><span class="annot"><span class="annottext">[TyBinder]
</span><a href="#local-6989586621680829241"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; ([TyBinder], Type)
</span><a href="GHC.Tc.Utils.TcType.html#tcSplitPiTys"><span class="hs-identifier hs-var">tcSplitPiTys</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829256"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-1349"></span><span>    </span><span id="local-6989586621680829243"><span class="annot"><span class="annottext">arity :: Arity
</span><a href="#local-6989586621680829243"><span class="hs-identifier hs-var hs-var">arity</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(TyBinder -&gt; Bool) -&gt; [TyBinder] -&gt; Arity
forall a. (a -&gt; Bool) -&gt; [a] -&gt; Arity
</span><a href="GHC.Utils.Misc.html#count"><span class="hs-identifier hs-var">count</span></a></span><span> </span><span class="annot"><span class="annottext">TyBinder -&gt; Bool
</span><a href="GHC.Core.Type.html#isAnonTyCoBinder"><span class="hs-identifier hs-var">isAnonTyCoBinder</span></a></span><span> </span><span class="annot"><span class="annottext">[TyBinder]
</span><a href="#local-6989586621680829241"><span class="hs-identifier hs-var">bndrs</span></a></span><span>
</span><span id="line-1350"></span><span>    </span><span id="local-6989586621680829242"><span class="annot"><span class="annottext">strict_sig :: StrictSig
</span><a href="#local-6989586621680829242"><span class="hs-identifier hs-var hs-var">strict_sig</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Demand] -&gt; Divergence -&gt; StrictSig
</span><a href="GHC.Types.Demand.html#mkClosedStrictSig"><span class="hs-identifier hs-var">mkClosedStrictSig</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Arity -&gt; Demand -&gt; [Demand]
forall a. Arity -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><a href="#local-6989586621680829243"><span class="hs-identifier hs-var">arity</span></a></span><span> </span><span class="annot"><span class="annottext">Demand
</span><a href="GHC.Types.Demand.html#topDmd"><span class="hs-identifier hs-var">topDmd</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Divergence
</span><a href="GHC.Types.Demand.html#topDiv"><span class="hs-identifier hs-var">topDiv</span></a></span><span>
</span><span id="line-1351"></span><span>    </span><span class="hs-comment">-- the call does not claim to be strict in its arguments, since they</span><span>
</span><span id="line-1352"></span><span>    </span><span class="hs-comment">-- may be lifted (foreign import prim) and the called code doesn't</span><span>
</span><span id="line-1353"></span><span>    </span><span class="hs-comment">-- necessarily force them. See #11076.</span><span>
</span><span id="line-1354"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{DictFuns and default methods}
*                                                                      *
************************************************************************

Note [Dict funs and default methods]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dict funs and default methods are *not* ImplicitIds.  Their definition
involves user-written code, so we can't figure out their strictness etc
based on fixed info, as we can for constructors and record selectors (say).

NB: See also Note [Exported LocalIds] in GHC.Types.Id
-}</span><span>
</span><span id="line-1369"></span><span>
</span><span id="line-1370"></span><span class="annot"><a href="GHC.Types.Id.Make.html#mkDictFunId"><span class="hs-identifier hs-type">mkDictFunId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>      </span><span class="hs-comment">-- Name to use for the dict fun;</span><span>
</span><span id="line-1371"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1372"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ThetaType"><span class="hs-identifier hs-type">ThetaType</span></a></span><span>
</span><span id="line-1373"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span>
</span><span id="line-1374"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1375"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-1376"></span><span class="hs-comment">-- Implements the DFun Superclass Invariant (see GHC.Tc.TyCl.Instance)</span><span>
</span><span id="line-1377"></span><span class="hs-comment">-- See Note [Dict funs and default methods]</span><span>
</span><span id="line-1378"></span><span>
</span><span id="line-1379"></span><span id="mkDictFunId"><span class="annot"><span class="annottext">mkDictFunId :: Name -&gt; [Var] -&gt; [Type] -&gt; Class -&gt; [Type] -&gt; Var
</span><a href="GHC.Types.Id.Make.html#mkDictFunId"><span class="hs-identifier hs-var hs-var">mkDictFunId</span></a></span></span><span> </span><span id="local-6989586621680829236"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829236"><span class="hs-identifier hs-var">dfun_name</span></a></span></span><span> </span><span id="local-6989586621680829235"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829235"><span class="hs-identifier hs-var">tvs</span></a></span></span><span> </span><span id="local-6989586621680829234"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829234"><span class="hs-identifier hs-var">theta</span></a></span></span><span> </span><span id="local-6989586621680829233"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680829233"><span class="hs-identifier hs-var">clas</span></a></span></span><span> </span><span id="local-6989586621680829232"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829232"><span class="hs-identifier hs-var">tys</span></a></span></span><span>
</span><span id="line-1380"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdDetails -&gt; Name -&gt; Type -&gt; Var
</span><a href="GHC.Types.Id.html#mkExportedLocalId"><span class="hs-identifier hs-var">mkExportedLocalId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; IdDetails
</span><a href="GHC.Types.Id.Info.html#DFunId"><span class="hs-identifier hs-var">DFunId</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680829229"><span class="hs-identifier hs-var">is_nt</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1381"></span><span>                      </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829236"><span class="hs-identifier hs-var">dfun_name</span></a></span><span>
</span><span id="line-1382"></span><span>                      </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829228"><span class="hs-identifier hs-var">dfun_ty</span></a></span><span>
</span><span id="line-1383"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1384"></span><span>    </span><span id="local-6989586621680829229"><span class="annot"><span class="annottext">is_nt :: Bool
</span><a href="#local-6989586621680829229"><span class="hs-identifier hs-var hs-var">is_nt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isNewTyCon"><span class="hs-identifier hs-var">isNewTyCon</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Class -&gt; TyCon
</span><a href="GHC.Core.Class.html#classTyCon"><span class="hs-identifier hs-var hs-var">classTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680829233"><span class="hs-identifier hs-var">clas</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1385"></span><span>    </span><span id="local-6989586621680829228"><span class="annot"><span class="annottext">dfun_ty :: Type
</span><a href="#local-6989586621680829228"><span class="hs-identifier hs-var hs-var">dfun_ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; [Type] -&gt; Class -&gt; [Type] -&gt; Type
</span><a href="GHC.Types.Id.Make.html#mkDictFunTy"><span class="hs-identifier hs-var">mkDictFunTy</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829235"><span class="hs-identifier hs-var">tvs</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829234"><span class="hs-identifier hs-var">theta</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680829233"><span class="hs-identifier hs-var">clas</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829232"><span class="hs-identifier hs-var">tys</span></a></span><span>
</span><span id="line-1386"></span><span>
</span><span id="line-1387"></span><span class="annot"><a href="GHC.Types.Id.Make.html#mkDictFunTy"><span class="hs-identifier hs-type">mkDictFunTy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ThetaType"><span class="hs-identifier hs-type">ThetaType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-1388"></span><span id="mkDictFunTy"><span class="annot"><span class="annottext">mkDictFunTy :: [Var] -&gt; [Type] -&gt; Class -&gt; [Type] -&gt; Type
</span><a href="GHC.Types.Id.Make.html#mkDictFunTy"><span class="hs-identifier hs-var hs-var">mkDictFunTy</span></a></span></span><span> </span><span id="local-6989586621680829227"><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829227"><span class="hs-identifier hs-var">tvs</span></a></span></span><span> </span><span id="local-6989586621680829226"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829226"><span class="hs-identifier hs-var">theta</span></a></span></span><span> </span><span id="local-6989586621680829225"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680829225"><span class="hs-identifier hs-var">clas</span></a></span></span><span> </span><span id="local-6989586621680829224"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829224"><span class="hs-identifier hs-var">tys</span></a></span></span><span>
</span><span id="line-1389"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; [Type] -&gt; Type -&gt; Type
</span><a href="GHC.Tc.Utils.TcType.html#mkSpecSigmaTy"><span class="hs-identifier hs-var">mkSpecSigmaTy</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829227"><span class="hs-identifier hs-var">tvs</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829226"><span class="hs-identifier hs-var">theta</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Class -&gt; [Type] -&gt; Type
</span><a href="GHC.Core.Predicate.html#mkClassPred"><span class="hs-identifier hs-var">mkClassPred</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621680829225"><span class="hs-identifier hs-var">clas</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680829224"><span class="hs-identifier hs-var">tys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1390"></span><span>
</span><span id="line-1391"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Un-definable}
*                                                                      *
************************************************************************

These Ids can't be defined in Haskell.  They could be defined in
unfoldings in the wired-in GHC.Prim interface file, but we'd have to
ensure that they were definitely, definitely inlined, because there is
no curried identifier for them.  That's what mkCompulsoryUnfolding
does.  If we had a way to get a compulsory unfolding from an interface
file, we could do that, but we don't right now.

The type variables we use here are &quot;open&quot; type variables: this means
they can unify with both unlifted and lifted types.  Hence we provide
another gun with which to shoot yourself in the foot.
-}</span><span>
</span><span id="line-1409"></span><span>
</span><span id="line-1410"></span><span class="annot"><a href="GHC.Types.Id.Make.html#nullAddrName"><span class="hs-identifier hs-type">nullAddrName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#seqName"><span class="hs-identifier hs-type">seqName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1411"></span><span>   </span><span class="annot"><a href="GHC.Types.Id.Make.html#realWorldName"><span class="hs-identifier hs-type">realWorldName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#voidPrimIdName"><span class="hs-identifier hs-type">voidPrimIdName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#coercionTokenName"><span class="hs-identifier hs-type">coercionTokenName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1412"></span><span>   </span><span class="annot"><a href="GHC.Types.Id.Make.html#magicDictName"><span class="hs-identifier hs-type">magicDictName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#coerceName"><span class="hs-identifier hs-type">coerceName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#proxyName"><span class="hs-identifier hs-type">proxyName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-1413"></span><span id="nullAddrName"><span class="annot"><span class="annottext">nullAddrName :: Name
</span><a href="GHC.Types.Id.Make.html#nullAddrName"><span class="hs-identifier hs-var hs-var">nullAddrName</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; RuleName -&gt; Unique -&gt; Var -&gt; Name
</span><a href="GHC.Builtin.Types.html#mkWiredInIdName"><span class="hs-identifier hs-var">mkWiredInIdName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="GHC.Builtin.Names.html#gHC_PRIM"><span class="hs-identifier hs-var">gHC_PRIM</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RuleName
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;nullAddr#&quot;</span></span><span class="hs-special">)</span><span>      </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#nullAddrIdKey"><span class="hs-identifier hs-var">nullAddrIdKey</span></a></span><span>      </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#nullAddrId"><span class="hs-identifier hs-var">nullAddrId</span></a></span><span>
</span><span id="line-1414"></span><span id="seqName"><span class="annot"><span class="annottext">seqName :: Name
</span><a href="GHC.Types.Id.Make.html#seqName"><span class="hs-identifier hs-var hs-var">seqName</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; RuleName -&gt; Unique -&gt; Var -&gt; Name
</span><a href="GHC.Builtin.Types.html#mkWiredInIdName"><span class="hs-identifier hs-var">mkWiredInIdName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="GHC.Builtin.Names.html#gHC_PRIM"><span class="hs-identifier hs-var">gHC_PRIM</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RuleName
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;seq&quot;</span></span><span class="hs-special">)</span><span>            </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#seqIdKey"><span class="hs-identifier hs-var">seqIdKey</span></a></span><span>           </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#seqId"><span class="hs-identifier hs-var">seqId</span></a></span><span>
</span><span id="line-1415"></span><span id="realWorldName"><span class="annot"><span class="annottext">realWorldName :: Name
</span><a href="GHC.Types.Id.Make.html#realWorldName"><span class="hs-identifier hs-var hs-var">realWorldName</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; RuleName -&gt; Unique -&gt; Var -&gt; Name
</span><a href="GHC.Builtin.Types.html#mkWiredInIdName"><span class="hs-identifier hs-var">mkWiredInIdName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="GHC.Builtin.Names.html#gHC_PRIM"><span class="hs-identifier hs-var">gHC_PRIM</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RuleName
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;realWorld#&quot;</span></span><span class="hs-special">)</span><span>     </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#realWorldPrimIdKey"><span class="hs-identifier hs-var">realWorldPrimIdKey</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#realWorldPrimId"><span class="hs-identifier hs-var">realWorldPrimId</span></a></span><span>
</span><span id="line-1416"></span><span id="voidPrimIdName"><span class="annot"><span class="annottext">voidPrimIdName :: Name
</span><a href="GHC.Types.Id.Make.html#voidPrimIdName"><span class="hs-identifier hs-var hs-var">voidPrimIdName</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; RuleName -&gt; Unique -&gt; Var -&gt; Name
</span><a href="GHC.Builtin.Types.html#mkWiredInIdName"><span class="hs-identifier hs-var">mkWiredInIdName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="GHC.Builtin.Names.html#gHC_PRIM"><span class="hs-identifier hs-var">gHC_PRIM</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RuleName
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;void#&quot;</span></span><span class="hs-special">)</span><span>          </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#voidPrimIdKey"><span class="hs-identifier hs-var">voidPrimIdKey</span></a></span><span>      </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#voidPrimId"><span class="hs-identifier hs-var">voidPrimId</span></a></span><span>
</span><span id="line-1417"></span><span id="coercionTokenName"><span class="annot"><span class="annottext">coercionTokenName :: Name
</span><a href="GHC.Types.Id.Make.html#coercionTokenName"><span class="hs-identifier hs-var hs-var">coercionTokenName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; RuleName -&gt; Unique -&gt; Var -&gt; Name
</span><a href="GHC.Builtin.Types.html#mkWiredInIdName"><span class="hs-identifier hs-var">mkWiredInIdName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="GHC.Builtin.Names.html#gHC_PRIM"><span class="hs-identifier hs-var">gHC_PRIM</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RuleName
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;coercionToken#&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#coercionTokenIdKey"><span class="hs-identifier hs-var">coercionTokenIdKey</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#coercionTokenId"><span class="hs-identifier hs-var">coercionTokenId</span></a></span><span>
</span><span id="line-1418"></span><span id="magicDictName"><span class="annot"><span class="annottext">magicDictName :: Name
</span><a href="GHC.Types.Id.Make.html#magicDictName"><span class="hs-identifier hs-var hs-var">magicDictName</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; RuleName -&gt; Unique -&gt; Var -&gt; Name
</span><a href="GHC.Builtin.Types.html#mkWiredInIdName"><span class="hs-identifier hs-var">mkWiredInIdName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="GHC.Builtin.Names.html#gHC_PRIM"><span class="hs-identifier hs-var">gHC_PRIM</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RuleName
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;magicDict&quot;</span></span><span class="hs-special">)</span><span>      </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#magicDictKey"><span class="hs-identifier hs-var">magicDictKey</span></a></span><span>       </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#magicDictId"><span class="hs-identifier hs-var">magicDictId</span></a></span><span>
</span><span id="line-1419"></span><span id="coerceName"><span class="annot"><span class="annottext">coerceName :: Name
</span><a href="GHC.Types.Id.Make.html#coerceName"><span class="hs-identifier hs-var hs-var">coerceName</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; RuleName -&gt; Unique -&gt; Var -&gt; Name
</span><a href="GHC.Builtin.Types.html#mkWiredInIdName"><span class="hs-identifier hs-var">mkWiredInIdName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="GHC.Builtin.Names.html#gHC_PRIM"><span class="hs-identifier hs-var">gHC_PRIM</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RuleName
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;coerce&quot;</span></span><span class="hs-special">)</span><span>         </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#coerceKey"><span class="hs-identifier hs-var">coerceKey</span></a></span><span>          </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#coerceId"><span class="hs-identifier hs-var">coerceId</span></a></span><span>
</span><span id="line-1420"></span><span id="proxyName"><span class="annot"><span class="annottext">proxyName :: Name
</span><a href="GHC.Types.Id.Make.html#proxyName"><span class="hs-identifier hs-var hs-var">proxyName</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; RuleName -&gt; Unique -&gt; Var -&gt; Name
</span><a href="GHC.Builtin.Types.html#mkWiredInIdName"><span class="hs-identifier hs-var">mkWiredInIdName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="GHC.Builtin.Names.html#gHC_PRIM"><span class="hs-identifier hs-var">gHC_PRIM</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RuleName
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;proxy#&quot;</span></span><span class="hs-special">)</span><span>         </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#proxyHashKey"><span class="hs-identifier hs-var">proxyHashKey</span></a></span><span>       </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#proxyHashId"><span class="hs-identifier hs-var">proxyHashId</span></a></span><span>
</span><span id="line-1421"></span><span>
</span><span id="line-1422"></span><span class="annot"><a href="GHC.Types.Id.Make.html#lazyIdName"><span class="hs-identifier hs-type">lazyIdName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#oneShotName"><span class="hs-identifier hs-type">oneShotName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.Make.html#noinlineIdName"><span class="hs-identifier hs-type">noinlineIdName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-1423"></span><span id="lazyIdName"><span class="annot"><span class="annottext">lazyIdName :: Name
</span><a href="GHC.Types.Id.Make.html#lazyIdName"><span class="hs-identifier hs-var hs-var">lazyIdName</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; RuleName -&gt; Unique -&gt; Var -&gt; Name
</span><a href="GHC.Builtin.Types.html#mkWiredInIdName"><span class="hs-identifier hs-var">mkWiredInIdName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="GHC.Builtin.Names.html#gHC_MAGIC"><span class="hs-identifier hs-var">gHC_MAGIC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RuleName
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lazy&quot;</span></span><span class="hs-special">)</span><span>           </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#lazyIdKey"><span class="hs-identifier hs-var">lazyIdKey</span></a></span><span>          </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#lazyId"><span class="hs-identifier hs-var">lazyId</span></a></span><span>
</span><span id="line-1424"></span><span id="oneShotName"><span class="annot"><span class="annottext">oneShotName :: Name
</span><a href="GHC.Types.Id.Make.html#oneShotName"><span class="hs-identifier hs-var hs-var">oneShotName</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; RuleName -&gt; Unique -&gt; Var -&gt; Name
</span><a href="GHC.Builtin.Types.html#mkWiredInIdName"><span class="hs-identifier hs-var">mkWiredInIdName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="GHC.Builtin.Names.html#gHC_MAGIC"><span class="hs-identifier hs-var">gHC_MAGIC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RuleName
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;oneShot&quot;</span></span><span class="hs-special">)</span><span>        </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#oneShotKey"><span class="hs-identifier hs-var">oneShotKey</span></a></span><span>         </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#oneShotId"><span class="hs-identifier hs-var">oneShotId</span></a></span><span>
</span><span id="line-1425"></span><span id="noinlineIdName"><span class="annot"><span class="annottext">noinlineIdName :: Name
</span><a href="GHC.Types.Id.Make.html#noinlineIdName"><span class="hs-identifier hs-var hs-var">noinlineIdName</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; RuleName -&gt; Unique -&gt; Var -&gt; Name
</span><a href="GHC.Builtin.Types.html#mkWiredInIdName"><span class="hs-identifier hs-var">mkWiredInIdName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="GHC.Builtin.Names.html#gHC_MAGIC"><span class="hs-identifier hs-var">gHC_MAGIC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RuleName
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;noinline&quot;</span></span><span class="hs-special">)</span><span>       </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#noinlineIdKey"><span class="hs-identifier hs-var">noinlineIdKey</span></a></span><span>      </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Types.Id.Make.html#noinlineId"><span class="hs-identifier hs-var">noinlineId</span></a></span><span>
</span><span id="line-1426"></span><span>
</span><span id="line-1427"></span><span class="hs-comment">------------------------------------------------</span><span>
</span><span id="line-1428"></span><span class="annot"><a href="GHC.Types.Id.Make.html#proxyHashId"><span class="hs-identifier hs-type">proxyHashId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-1429"></span><span id="proxyHashId"><span class="annot"><span class="annottext">proxyHashId :: Var
</span><a href="GHC.Types.Id.Make.html#proxyHashId"><span class="hs-identifier hs-var hs-var">proxyHashId</span></a></span></span><span>
</span><span id="line-1430"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.Make.html#pcMiscPrelId"><span class="hs-identifier hs-var">pcMiscPrelId</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Types.Id.Make.html#proxyName"><span class="hs-identifier hs-var">proxyName</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829200"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-1431"></span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#noCafIdInfo"><span class="hs-identifier hs-var">noCafIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Unfolding -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setUnfoldingInfo"><span class="hs-operator hs-var">`setUnfoldingInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">Unfolding
</span><a href="GHC.Core.html#evaldUnfolding"><span class="hs-identifier hs-var">evaldUnfolding</span></a></span><span> </span><span class="hs-comment">-- Note [evaldUnfoldings]</span><span>
</span><span id="line-1432"></span><span>                    </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; IdInfo -&gt; Type -&gt; IdInfo
IdInfo -&gt; Type -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setNeverLevPoly"><span class="hs-operator hs-var">`setNeverLevPoly`</span></a></span><span>  </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829200"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1433"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1434"></span><span>    </span><span class="hs-comment">-- proxy# :: forall {k} (a:k). Proxy# k a</span><span>
</span><span id="line-1435"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-1436"></span><span>    </span><span class="hs-comment">-- The visibility of the `k` binder is Inferred to match the type of the</span><span>
</span><span id="line-1437"></span><span>    </span><span class="hs-comment">-- Proxy data constructor (#16293).</span><span>
</span><span id="line-1438"></span><span>    </span><span class="hs-special">[</span><span id="local-6989586621680829198"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829198"><span class="hs-identifier hs-var">kv</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680829197"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829197"><span class="hs-identifier hs-var">tv</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; ([Type] -&gt; [Type]) -&gt; [Var]
</span><a href="GHC.Builtin.Types.Prim.html#mkTemplateKiTyVars"><span class="hs-identifier hs-var">mkTemplateKiTyVars</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.html#liftedTypeKind"><span class="hs-identifier hs-var">liftedTypeKind</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; [Type]
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-1439"></span><span>    </span><span id="local-6989586621680829193"><span class="annot"><span class="annottext">kv_ty :: Type
</span><a href="#local-6989586621680829193"><span class="hs-identifier hs-var hs-var">kv_ty</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkTyVarTy"><span class="hs-identifier hs-var">mkTyVarTy</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829198"><span class="hs-identifier hs-var">kv</span></a></span><span>
</span><span id="line-1440"></span><span>    </span><span id="local-6989586621680829191"><span class="annot"><span class="annottext">tv_ty :: Type
</span><a href="#local-6989586621680829191"><span class="hs-identifier hs-var hs-var">tv_ty</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkTyVarTy"><span class="hs-identifier hs-var">mkTyVarTy</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829197"><span class="hs-identifier hs-var">tv</span></a></span><span>
</span><span id="line-1441"></span><span>    </span><span id="local-6989586621680829200"><span class="annot"><span class="annottext">ty :: Type
</span><a href="#local-6989586621680829200"><span class="hs-identifier hs-var hs-var">ty</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var -&gt; Type -&gt; Type
</span><a href="GHC.Core.Type.html#mkInfForAllTy"><span class="hs-identifier hs-var">mkInfForAllTy</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829198"><span class="hs-identifier hs-var">kv</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Type) -&gt; Type -&gt; Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; Type -&gt; Type
</span><a href="GHC.Core.Type.html#mkSpecForAllTy"><span class="hs-identifier hs-var">mkSpecForAllTy</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829197"><span class="hs-identifier hs-var">tv</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Type) -&gt; Type -&gt; Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; Type
</span><a href="GHC.Builtin.Types.Prim.html#mkProxyPrimTy"><span class="hs-identifier hs-var">mkProxyPrimTy</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829193"><span class="hs-identifier hs-var">kv_ty</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829191"><span class="hs-identifier hs-var">tv_ty</span></a></span><span>
</span><span id="line-1442"></span><span>
</span><span id="line-1443"></span><span class="hs-comment">------------------------------------------------</span><span>
</span><span id="line-1444"></span><span class="annot"><a href="GHC.Types.Id.Make.html#nullAddrId"><span class="hs-identifier hs-type">nullAddrId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-1445"></span><span class="hs-comment">-- nullAddr# :: Addr#</span><span>
</span><span id="line-1446"></span><span class="hs-comment">-- The reason it is here is because we don't provide</span><span>
</span><span id="line-1447"></span><span class="hs-comment">-- a way to write this literal in Haskell.</span><span>
</span><span id="line-1448"></span><span id="nullAddrId"><span class="annot"><span class="annottext">nullAddrId :: Var
</span><a href="GHC.Types.Id.Make.html#nullAddrId"><span class="hs-identifier hs-var hs-var">nullAddrId</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.Make.html#pcMiscPrelId"><span class="hs-identifier hs-var">pcMiscPrelId</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Types.Id.Make.html#nullAddrName"><span class="hs-identifier hs-var">nullAddrName</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#addrPrimTy"><span class="hs-identifier hs-var">addrPrimTy</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680829186"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-1449"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1450"></span><span>    </span><span id="local-6989586621680829186"><span class="annot"><span class="annottext">info :: IdInfo
</span><a href="#local-6989586621680829186"><span class="hs-identifier hs-var hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#noCafIdInfo"><span class="hs-identifier hs-var">noCafIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; InlinePragma -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setInlinePragInfo"><span class="hs-operator hs-var">`setInlinePragInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">InlinePragma
</span><a href="GHC.Types.Basic.html#alwaysInlinePragma"><span class="hs-identifier hs-var">alwaysInlinePragma</span></a></span><span>
</span><span id="line-1451"></span><span>                       </span><span class="annot"><span class="annottext">IdInfo -&gt; Unfolding -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setUnfoldingInfo"><span class="hs-operator hs-var">`setUnfoldingInfo`</span></a></span><span>  </span><span class="annot"><span class="annottext">CoreExpr -&gt; Unfolding
</span><a href="GHC.Core.Unfold.html#mkCompulsoryUnfolding"><span class="hs-identifier hs-var">mkCompulsoryUnfolding</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Literal -&gt; CoreExpr
forall b. Literal -&gt; Expr b
</span><a href="GHC.Core.html#Lit"><span class="hs-identifier hs-var">Lit</span></a></span><span> </span><span class="annot"><span class="annottext">Literal
</span><a href="GHC.Types.Literal.html#nullAddrLit"><span class="hs-identifier hs-var">nullAddrLit</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1452"></span><span>                       </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; IdInfo -&gt; Type -&gt; IdInfo
IdInfo -&gt; Type -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setNeverLevPoly"><span class="hs-operator hs-var">`setNeverLevPoly`</span></a></span><span>   </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#addrPrimTy"><span class="hs-identifier hs-var">addrPrimTy</span></a></span><span>
</span><span id="line-1453"></span><span>
</span><span id="line-1454"></span><span class="hs-comment">------------------------------------------------</span><span>
</span><span id="line-1455"></span><span class="annot"><a href="GHC.Types.Id.Make.html#seqId"><span class="hs-identifier hs-type">seqId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>     </span><span class="hs-comment">-- See Note [seqId magic]</span><span>
</span><span id="line-1456"></span><span id="seqId"><span class="annot"><span class="annottext">seqId :: Var
</span><a href="GHC.Types.Id.Make.html#seqId"><span class="hs-identifier hs-var hs-var">seqId</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.Make.html#pcMiscPrelId"><span class="hs-identifier hs-var">pcMiscPrelId</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Types.Id.Make.html#seqName"><span class="hs-identifier hs-var">seqName</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829182"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680829181"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-1457"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1458"></span><span>    </span><span id="local-6989586621680829181"><span class="annot"><span class="annottext">info :: IdInfo
</span><a href="#local-6989586621680829181"><span class="hs-identifier hs-var hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#noCafIdInfo"><span class="hs-identifier hs-var">noCafIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; InlinePragma -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setInlinePragInfo"><span class="hs-operator hs-var">`setInlinePragInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">InlinePragma
</span><a href="#local-6989586621680829180"><span class="hs-identifier hs-var">inline_prag</span></a></span><span>
</span><span id="line-1459"></span><span>                       </span><span class="annot"><span class="annottext">IdInfo -&gt; Unfolding -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setUnfoldingInfo"><span class="hs-operator hs-var">`setUnfoldingInfo`</span></a></span><span>  </span><span class="annot"><span class="annottext">CoreExpr -&gt; Unfolding
</span><a href="GHC.Core.Unfold.html#mkCompulsoryUnfolding"><span class="hs-identifier hs-var">mkCompulsoryUnfolding</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829179"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-1460"></span><span>
</span><span id="line-1461"></span><span>    </span><span id="local-6989586621680829180"><span class="annot"><span class="annottext">inline_prag :: InlinePragma
</span><a href="#local-6989586621680829180"><span class="hs-identifier hs-var hs-var">inline_prag</span></a></span></span><span>
</span><span id="line-1462"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InlinePragma
</span><a href="GHC.Types.Basic.html#alwaysInlinePragma"><span class="hs-identifier hs-var">alwaysInlinePragma</span></a></span><span> </span><span class="annot"><span class="annottext">InlinePragma -&gt; Activation -&gt; InlinePragma
</span><a href="GHC.Types.Basic.html#setInlinePragmaActivation"><span class="hs-operator hs-var">`setInlinePragmaActivation`</span></a></span><span> </span><span class="annot"><span class="annottext">SourceText -&gt; Arity -&gt; Activation
</span><a href="GHC.Types.Basic.html#ActiveAfter"><span class="hs-identifier hs-var">ActiveAfter</span></a></span><span>
</span><span id="line-1463"></span><span>                 </span><span class="annot"><span class="annottext">SourceText
</span><a href="GHC.Types.Basic.html#NoSourceText"><span class="hs-identifier hs-var">NoSourceText</span></a></span><span> </span><span class="annot"><span class="annottext">Arity
</span><span class="hs-number">0</span></span><span>
</span><span id="line-1464"></span><span>                  </span><span class="hs-comment">-- Make 'seq' not inline-always, so that simpleOptExpr</span><span>
</span><span id="line-1465"></span><span>                  </span><span class="hs-comment">-- (see GHC.Core.Subst.simple_app) won't inline 'seq' on the</span><span>
</span><span id="line-1466"></span><span>                  </span><span class="hs-comment">-- LHS of rules.  That way we can have rules for 'seq';</span><span>
</span><span id="line-1467"></span><span>                  </span><span class="hs-comment">-- see Note [seqId magic]</span><span>
</span><span id="line-1468"></span><span>
</span><span id="line-1469"></span><span>    </span><span class="hs-comment">-- seq :: forall (r :: RuntimeRep) a (b :: TYPE r). a -&gt; b -&gt; b</span><span>
</span><span id="line-1470"></span><span>    </span><span id="local-6989586621680829182"><span class="annot"><span class="annottext">ty :: Type
</span><a href="#local-6989586621680829182"><span class="hs-identifier hs-var hs-var">ty</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span>
</span><span id="line-1471"></span><span>      </span><span class="annot"><span class="annottext">Var -&gt; Type -&gt; Type
</span><a href="GHC.Core.Type.html#mkInfForAllTy"><span class="hs-identifier hs-var">mkInfForAllTy</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Builtin.Types.Prim.html#runtimeRep2TyVar"><span class="hs-identifier hs-var">runtimeRep2TyVar</span></a></span><span>
</span><span id="line-1472"></span><span>      </span><span class="annot"><span class="annottext">(Type -&gt; Type) -&gt; Type -&gt; Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; Type -&gt; Type
</span><a href="GHC.Core.Type.html#mkSpecForAllTys"><span class="hs-identifier hs-var">mkSpecForAllTys</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Builtin.Types.Prim.html#alphaTyVar"><span class="hs-identifier hs-var">alphaTyVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Builtin.Types.Prim.html#openBetaTyVar"><span class="hs-identifier hs-var">openBetaTyVar</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1473"></span><span>      </span><span class="annot"><span class="annottext">(Type -&gt; Type) -&gt; Type -&gt; Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkVisFunTyMany"><span class="hs-identifier hs-var">mkVisFunTyMany</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#alphaTy"><span class="hs-identifier hs-var">alphaTy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkVisFunTyMany"><span class="hs-identifier hs-var">mkVisFunTyMany</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#openBetaTy"><span class="hs-identifier hs-var">openBetaTy</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#openBetaTy"><span class="hs-identifier hs-var">openBetaTy</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1474"></span><span>
</span><span id="line-1475"></span><span>    </span><span class="hs-special">[</span><span id="local-6989586621680829170"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829170"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680829169"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829169"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; [Var]
</span><a href="GHC.Types.Id.html#mkTemplateLocals"><span class="hs-identifier hs-var">mkTemplateLocals</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#alphaTy"><span class="hs-identifier hs-var">alphaTy</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#openBetaTy"><span class="hs-identifier hs-var">openBetaTy</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1476"></span><span>    </span><span id="local-6989586621680829179"><span class="annot"><span class="annottext">rhs :: CoreExpr
</span><a href="#local-6989586621680829179"><span class="hs-identifier hs-var hs-var">rhs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; CoreExpr -&gt; CoreExpr
forall b. [b] -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#mkLams"><span class="hs-identifier hs-var">mkLams</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Builtin.Types.Prim.html#runtimeRep2TyVar"><span class="hs-identifier hs-var">runtimeRep2TyVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Builtin.Types.Prim.html#alphaTyVar"><span class="hs-identifier hs-var">alphaTyVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Builtin.Types.Prim.html#openBetaTyVar"><span class="hs-identifier hs-var">openBetaTyVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829170"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829169"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1477"></span><span>          </span><span class="annot"><span class="annottext">CoreExpr -&gt; Var -&gt; Type -&gt; [Alt Var] -&gt; CoreExpr
forall b. Expr b -&gt; b -&gt; Type -&gt; [Alt b] -&gt; Expr b
</span><a href="GHC.Core.html#Case"><span class="hs-identifier hs-var">Case</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; CoreExpr
forall b. Var -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829170"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829170"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#openBetaTy"><span class="hs-identifier hs-var">openBetaTy</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">AltCon
</span><a href="GHC.Core.html#DEFAULT"><span class="hs-identifier hs-var">DEFAULT</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var -&gt; CoreExpr
forall b. Var -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829169"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-1478"></span><span>
</span><span id="line-1479"></span><span class="hs-comment">------------------------------------------------</span><span>
</span><span id="line-1480"></span><span class="annot"><a href="GHC.Types.Id.Make.html#lazyId"><span class="hs-identifier hs-type">lazyId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>    </span><span class="hs-comment">-- See Note [lazyId magic]</span><span>
</span><span id="line-1481"></span><span id="lazyId"><span class="annot"><span class="annottext">lazyId :: Var
</span><a href="GHC.Types.Id.Make.html#lazyId"><span class="hs-identifier hs-var hs-var">lazyId</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.Make.html#pcMiscPrelId"><span class="hs-identifier hs-var">pcMiscPrelId</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Types.Id.Make.html#lazyIdName"><span class="hs-identifier hs-var">lazyIdName</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829165"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680829164"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-1482"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1483"></span><span>    </span><span id="local-6989586621680829164"><span class="annot"><span class="annottext">info :: IdInfo
</span><a href="#local-6989586621680829164"><span class="hs-identifier hs-var hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#noCafIdInfo"><span class="hs-identifier hs-var">noCafIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; IdInfo -&gt; Type -&gt; IdInfo
IdInfo -&gt; Type -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setNeverLevPoly"><span class="hs-operator hs-var">`setNeverLevPoly`</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829165"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-1484"></span><span>    </span><span id="local-6989586621680829165"><span class="annot"><span class="annottext">ty :: Type
</span><a href="#local-6989586621680829165"><span class="hs-identifier hs-var hs-var">ty</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; Type -&gt; Type
</span><a href="GHC.Core.Type.html#mkSpecForAllTys"><span class="hs-identifier hs-var">mkSpecForAllTys</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Builtin.Types.Prim.html#alphaTyVar"><span class="hs-identifier hs-var">alphaTyVar</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkVisFunTyMany"><span class="hs-identifier hs-var">mkVisFunTyMany</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#alphaTy"><span class="hs-identifier hs-var">alphaTy</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#alphaTy"><span class="hs-identifier hs-var">alphaTy</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1485"></span><span>
</span><span id="line-1486"></span><span class="annot"><a href="GHC.Types.Id.Make.html#noinlineId"><span class="hs-identifier hs-type">noinlineId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-comment">-- See Note [noinlineId magic]</span><span>
</span><span id="line-1487"></span><span id="noinlineId"><span class="annot"><span class="annottext">noinlineId :: Var
</span><a href="GHC.Types.Id.Make.html#noinlineId"><span class="hs-identifier hs-var hs-var">noinlineId</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.Make.html#pcMiscPrelId"><span class="hs-identifier hs-var">pcMiscPrelId</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Types.Id.Make.html#noinlineIdName"><span class="hs-identifier hs-var">noinlineIdName</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829162"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680829161"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-1488"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1489"></span><span>    </span><span id="local-6989586621680829161"><span class="annot"><span class="annottext">info :: IdInfo
</span><a href="#local-6989586621680829161"><span class="hs-identifier hs-var hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#noCafIdInfo"><span class="hs-identifier hs-var">noCafIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; IdInfo -&gt; Type -&gt; IdInfo
IdInfo -&gt; Type -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setNeverLevPoly"><span class="hs-operator hs-var">`setNeverLevPoly`</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829162"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-1490"></span><span>    </span><span id="local-6989586621680829162"><span class="annot"><span class="annottext">ty :: Type
</span><a href="#local-6989586621680829162"><span class="hs-identifier hs-var hs-var">ty</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; Type -&gt; Type
</span><a href="GHC.Core.Type.html#mkSpecForAllTys"><span class="hs-identifier hs-var">mkSpecForAllTys</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Builtin.Types.Prim.html#alphaTyVar"><span class="hs-identifier hs-var">alphaTyVar</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkVisFunTyMany"><span class="hs-identifier hs-var">mkVisFunTyMany</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#alphaTy"><span class="hs-identifier hs-var">alphaTy</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#alphaTy"><span class="hs-identifier hs-var">alphaTy</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1491"></span><span>
</span><span id="line-1492"></span><span class="annot"><a href="GHC.Types.Id.Make.html#oneShotId"><span class="hs-identifier hs-type">oneShotId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-comment">-- See Note [The oneShot function]</span><span>
</span><span id="line-1493"></span><span id="oneShotId"><span class="annot"><span class="annottext">oneShotId :: Var
</span><a href="GHC.Types.Id.Make.html#oneShotId"><span class="hs-identifier hs-var hs-var">oneShotId</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.Make.html#pcMiscPrelId"><span class="hs-identifier hs-var">pcMiscPrelId</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Types.Id.Make.html#oneShotName"><span class="hs-identifier hs-var">oneShotName</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829159"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680829158"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-1494"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1495"></span><span>    </span><span id="local-6989586621680829158"><span class="annot"><span class="annottext">info :: IdInfo
</span><a href="#local-6989586621680829158"><span class="hs-identifier hs-var hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#noCafIdInfo"><span class="hs-identifier hs-var">noCafIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; InlinePragma -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setInlinePragInfo"><span class="hs-operator hs-var">`setInlinePragInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">InlinePragma
</span><a href="GHC.Types.Basic.html#alwaysInlinePragma"><span class="hs-identifier hs-var">alwaysInlinePragma</span></a></span><span>
</span><span id="line-1496"></span><span>                       </span><span class="annot"><span class="annottext">IdInfo -&gt; Unfolding -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setUnfoldingInfo"><span class="hs-operator hs-var">`setUnfoldingInfo`</span></a></span><span>  </span><span class="annot"><span class="annottext">CoreExpr -&gt; Unfolding
</span><a href="GHC.Core.Unfold.html#mkCompulsoryUnfolding"><span class="hs-identifier hs-var">mkCompulsoryUnfolding</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829157"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-1497"></span><span>    </span><span id="local-6989586621680829159"><span class="annot"><span class="annottext">ty :: Type
</span><a href="#local-6989586621680829159"><span class="hs-identifier hs-var hs-var">ty</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; Type -&gt; Type
</span><a href="GHC.Core.Type.html#mkSpecForAllTys"><span class="hs-identifier hs-var">mkSpecForAllTys</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Builtin.Types.Prim.html#runtimeRep1TyVar"><span class="hs-identifier hs-var">runtimeRep1TyVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Builtin.Types.Prim.html#runtimeRep2TyVar"><span class="hs-identifier hs-var">runtimeRep2TyVar</span></a></span><span>
</span><span id="line-1498"></span><span>                          </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Builtin.Types.Prim.html#openAlphaTyVar"><span class="hs-identifier hs-var">openAlphaTyVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Builtin.Types.Prim.html#openBetaTyVar"><span class="hs-identifier hs-var">openBetaTyVar</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-1499"></span><span>                          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkVisFunTyMany"><span class="hs-identifier hs-var">mkVisFunTyMany</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829154"><span class="hs-identifier hs-var">fun_ty</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829154"><span class="hs-identifier hs-var">fun_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1500"></span><span>    </span><span id="local-6989586621680829154"><span class="annot"><span class="annottext">fun_ty :: Type
</span><a href="#local-6989586621680829154"><span class="hs-identifier hs-var hs-var">fun_ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkVisFunTyMany"><span class="hs-identifier hs-var">mkVisFunTyMany</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#openAlphaTy"><span class="hs-identifier hs-var">openAlphaTy</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#openBetaTy"><span class="hs-identifier hs-var">openBetaTy</span></a></span><span>
</span><span id="line-1501"></span><span>    </span><span class="hs-special">[</span><span id="local-6989586621680829152"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829152"><span class="hs-identifier hs-var">body</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829151"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829151"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; [Var]
</span><a href="GHC.Types.Id.html#mkTemplateLocals"><span class="hs-identifier hs-var">mkTemplateLocals</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829154"><span class="hs-identifier hs-var">fun_ty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#openAlphaTy"><span class="hs-identifier hs-var">openAlphaTy</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1502"></span><span>    </span><span id="local-6989586621680829150"><span class="annot"><span class="annottext">x' :: Var
</span><a href="#local-6989586621680829150"><span class="hs-identifier hs-var hs-var">x'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Var -&gt; Var
</span><a href="GHC.Types.Id.html#setOneShotLambda"><span class="hs-identifier hs-var">setOneShotLambda</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829151"><span class="hs-identifier hs-var">x</span></a></span><span>  </span><span class="hs-comment">-- Here is the magic bit!</span><span>
</span><span id="line-1503"></span><span>    </span><span id="local-6989586621680829157"><span class="annot"><span class="annottext">rhs :: CoreExpr
</span><a href="#local-6989586621680829157"><span class="hs-identifier hs-var hs-var">rhs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; CoreExpr -&gt; CoreExpr
forall b. [b] -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#mkLams"><span class="hs-identifier hs-var">mkLams</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Builtin.Types.Prim.html#runtimeRep1TyVar"><span class="hs-identifier hs-var">runtimeRep1TyVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Builtin.Types.Prim.html#runtimeRep2TyVar"><span class="hs-identifier hs-var">runtimeRep2TyVar</span></a></span><span>
</span><span id="line-1504"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Builtin.Types.Prim.html#openAlphaTyVar"><span class="hs-identifier hs-var">openAlphaTyVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Builtin.Types.Prim.html#openBetaTyVar"><span class="hs-identifier hs-var">openBetaTyVar</span></a></span><span>
</span><span id="line-1505"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829152"><span class="hs-identifier hs-var">body</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829150"><span class="hs-identifier hs-var">x'</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1506"></span><span>          </span><span class="annot"><span class="annottext">Var -&gt; CoreExpr
forall b. Var -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829152"><span class="hs-identifier hs-var">body</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; CoreExpr -&gt; CoreExpr
forall b. Expr b -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#App"><span class="hs-operator hs-var">`App`</span></a></span><span> </span><span class="annot"><span class="annottext">Var -&gt; CoreExpr
forall b. Var -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829151"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-1507"></span><span>
</span><span id="line-1508"></span><span class="hs-comment">--------------------------------------------------------------------------------</span><span>
</span><span id="line-1509"></span><span class="annot"><a href="GHC.Types.Id.Make.html#magicDictId"><span class="hs-identifier hs-type">magicDictId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>  </span><span class="hs-comment">-- See Note [magicDictId magic]</span><span>
</span><span id="line-1510"></span><span id="magicDictId"><span class="annot"><span class="annottext">magicDictId :: Var
</span><a href="GHC.Types.Id.Make.html#magicDictId"><span class="hs-identifier hs-var hs-var">magicDictId</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.Make.html#pcMiscPrelId"><span class="hs-identifier hs-var">pcMiscPrelId</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Types.Id.Make.html#magicDictName"><span class="hs-identifier hs-var">magicDictName</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829147"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680829146"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-1511"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1512"></span><span>  </span><span id="local-6989586621680829146"><span class="annot"><span class="annottext">info :: IdInfo
</span><a href="#local-6989586621680829146"><span class="hs-identifier hs-var hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#noCafIdInfo"><span class="hs-identifier hs-var">noCafIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; InlinePragma -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setInlinePragInfo"><span class="hs-operator hs-var">`setInlinePragInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">InlinePragma
</span><a href="GHC.Types.Basic.html#neverInlinePragma"><span class="hs-identifier hs-var">neverInlinePragma</span></a></span><span>
</span><span id="line-1513"></span><span>                     </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; IdInfo -&gt; Type -&gt; IdInfo
IdInfo -&gt; Type -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setNeverLevPoly"><span class="hs-operator hs-var">`setNeverLevPoly`</span></a></span><span>   </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829147"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-1514"></span><span>  </span><span id="local-6989586621680829147"><span class="annot"><span class="annottext">ty :: Type
</span><a href="#local-6989586621680829147"><span class="hs-identifier hs-var hs-var">ty</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; Type -&gt; Type
</span><a href="GHC.Core.Type.html#mkSpecForAllTys"><span class="hs-identifier hs-var">mkSpecForAllTys</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Var
</span><a href="GHC.Builtin.Types.Prim.html#alphaTyVar"><span class="hs-identifier hs-var">alphaTyVar</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#alphaTy"><span class="hs-identifier hs-var">alphaTy</span></a></span><span>
</span><span id="line-1515"></span><span>
</span><span id="line-1516"></span><span class="hs-comment">--------------------------------------------------------------------------------</span><span>
</span><span id="line-1517"></span><span>
</span><span id="line-1518"></span><span class="annot"><a href="GHC.Types.Id.Make.html#coerceId"><span class="hs-identifier hs-type">coerceId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-1519"></span><span id="coerceId"><span class="annot"><span class="annottext">coerceId :: Var
</span><a href="GHC.Types.Id.Make.html#coerceId"><span class="hs-identifier hs-var hs-var">coerceId</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.Make.html#pcMiscPrelId"><span class="hs-identifier hs-var">pcMiscPrelId</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Types.Id.Make.html#coerceName"><span class="hs-identifier hs-var">coerceName</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829144"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680829143"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-1520"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1521"></span><span>    </span><span id="local-6989586621680829143"><span class="annot"><span class="annottext">info :: IdInfo
</span><a href="#local-6989586621680829143"><span class="hs-identifier hs-var hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#noCafIdInfo"><span class="hs-identifier hs-var">noCafIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; InlinePragma -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setInlinePragInfo"><span class="hs-operator hs-var">`setInlinePragInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">InlinePragma
</span><a href="GHC.Types.Basic.html#alwaysInlinePragma"><span class="hs-identifier hs-var">alwaysInlinePragma</span></a></span><span>
</span><span id="line-1522"></span><span>                       </span><span class="annot"><span class="annottext">IdInfo -&gt; Unfolding -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setUnfoldingInfo"><span class="hs-operator hs-var">`setUnfoldingInfo`</span></a></span><span>  </span><span class="annot"><span class="annottext">CoreExpr -&gt; Unfolding
</span><a href="GHC.Core.Unfold.html#mkCompulsoryUnfolding"><span class="hs-identifier hs-var">mkCompulsoryUnfolding</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621680829142"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-1523"></span><span>    </span><span id="local-6989586621680829141"><span class="annot"><span class="annottext">eqRTy :: Type
</span><a href="#local-6989586621680829141"><span class="hs-identifier hs-var hs-var">eqRTy</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [Type] -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkTyConApp"><span class="hs-identifier hs-var">mkTyConApp</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="GHC.Builtin.Types.html#coercibleTyCon"><span class="hs-identifier hs-var">coercibleTyCon</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Type
</span><a href="GHC.Builtin.Types.Prim.html#tYPE"><span class="hs-identifier hs-var">tYPE</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829137"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829136"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829135"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-1524"></span><span>    </span><span id="local-6989586621680829134"><span class="annot"><span class="annottext">eqRPrimTy :: Type
</span><a href="#local-6989586621680829134"><span class="hs-identifier hs-var hs-var">eqRPrimTy</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [Type] -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkTyConApp"><span class="hs-identifier hs-var">mkTyConApp</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="GHC.Builtin.Types.Prim.html#eqReprPrimTyCon"><span class="hs-identifier hs-var">eqReprPrimTyCon</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Type
</span><a href="GHC.Builtin.Types.Prim.html#tYPE"><span class="hs-identifier hs-var">tYPE</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829137"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Type
</span><a href="GHC.Builtin.Types.Prim.html#tYPE"><span class="hs-identifier hs-var">tYPE</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829137"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829136"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829135"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-1525"></span><span>    </span><span id="local-6989586621680829144"><span class="annot"><span class="annottext">ty :: Type
</span><a href="#local-6989586621680829144"><span class="hs-identifier hs-var hs-var">ty</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[InvisTVBinder] -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkInvisForAllTys"><span class="hs-identifier hs-var">mkInvisForAllTys</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Var -&gt; Specificity -&gt; InvisTVBinder
forall var argf. var -&gt; argf -&gt; VarBndr var argf
</span><a href="GHC.Types.Var.html#Bndr"><span class="hs-identifier hs-var">Bndr</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829132"><span class="hs-identifier hs-var">rv</span></a></span><span> </span><span class="annot"><span class="annottext">Specificity
</span><a href="GHC.Types.Var.html#InferredSpec"><span class="hs-identifier hs-var">InferredSpec</span></a></span><span>
</span><span id="line-1526"></span><span>                                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var -&gt; Specificity -&gt; InvisTVBinder
forall var argf. var -&gt; argf -&gt; VarBndr var argf
</span><a href="GHC.Types.Var.html#Bndr"><span class="hs-identifier hs-var">Bndr</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829130"><span class="hs-identifier hs-var">av</span></a></span><span> </span><span class="annot"><span class="annottext">Specificity
</span><a href="GHC.Types.Var.html#SpecifiedSpec"><span class="hs-identifier hs-var">SpecifiedSpec</span></a></span><span>
</span><span id="line-1527"></span><span>                                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var -&gt; Specificity -&gt; InvisTVBinder
forall var argf. var -&gt; argf -&gt; VarBndr var argf
</span><a href="GHC.Types.Var.html#Bndr"><span class="hs-identifier hs-var">Bndr</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829128"><span class="hs-identifier hs-var">bv</span></a></span><span> </span><span class="annot"><span class="annottext">Specificity
</span><a href="GHC.Types.Var.html#SpecifiedSpec"><span class="hs-identifier hs-var">SpecifiedSpec</span></a></span><span>
</span><span id="line-1528"></span><span>                                 </span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Type) -&gt; Type -&gt; Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1529"></span><span>                </span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkInvisFunTyMany"><span class="hs-identifier hs-var">mkInvisFunTyMany</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829141"><span class="hs-identifier hs-var">eqRTy</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Type) -&gt; Type -&gt; Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1530"></span><span>                </span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkVisFunTyMany"><span class="hs-identifier hs-var">mkVisFunTyMany</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829136"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829135"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-1531"></span><span>
</span><span id="line-1532"></span><span>    </span><span id="local-6989586621680829127"><span class="annot"><span class="annottext">bndrs :: [Var]
</span><a href="#local-6989586621680829127"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">[</span><span id="local-6989586621680829132"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829132"><span class="hs-identifier hs-var">rv</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680829130"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829130"><span class="hs-identifier hs-var">av</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680829128"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829128"><span class="hs-identifier hs-var">bv</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; (Type -&gt; [Type]) -&gt; [Var]
</span><a href="GHC.Builtin.Types.Prim.html#mkTemplateKiTyVar"><span class="hs-identifier hs-var">mkTemplateKiTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.html#runtimeRepTy"><span class="hs-identifier hs-var">runtimeRepTy</span></a></span><span>
</span><span id="line-1533"></span><span>                        </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680829124"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829124"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Type -&gt; Type
</span><a href="GHC.Builtin.Types.Prim.html#tYPE"><span class="hs-identifier hs-var">tYPE</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829124"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Type
</span><a href="GHC.Builtin.Types.Prim.html#tYPE"><span class="hs-identifier hs-var">tYPE</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829124"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-1534"></span><span>
</span><span id="line-1535"></span><span>    </span><span class="hs-special">[</span><span id="local-6989586621680829137"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829137"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829136"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829136"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680829135"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829135"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; [Type]
</span><a href="GHC.Core.TyCo.Rep.html#mkTyVarTys"><span class="hs-identifier hs-var">mkTyVarTys</span></a></span><span> </span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829127"><span class="hs-identifier hs-var">bndrs</span></a></span><span>
</span><span id="line-1536"></span><span>
</span><span id="line-1537"></span><span>    </span><span class="hs-special">[</span><span id="local-6989586621680829123"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829123"><span class="hs-identifier hs-var">eqR</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680829122"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829122"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680829121"><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829121"><span class="hs-identifier hs-var">eq</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; [Var]
</span><a href="GHC.Types.Id.html#mkTemplateLocals"><span class="hs-identifier hs-var">mkTemplateLocals</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829141"><span class="hs-identifier hs-var">eqRTy</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829136"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829134"><span class="hs-identifier hs-var">eqRPrimTy</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1538"></span><span>    </span><span id="local-6989586621680829142"><span class="annot"><span class="annottext">rhs :: CoreExpr
</span><a href="#local-6989586621680829142"><span class="hs-identifier hs-var hs-var">rhs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; CoreExpr -&gt; CoreExpr
forall b. [b] -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#mkLams"><span class="hs-identifier hs-var">mkLams</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Var]
</span><a href="#local-6989586621680829127"><span class="hs-identifier hs-var">bndrs</span></a></span><span> </span><span class="annot"><span class="annottext">[Var] -&gt; [Var] -&gt; [Var]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829123"><span class="hs-identifier hs-var">eqR</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829122"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; CoreExpr) -&gt; CoreExpr -&gt; CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1539"></span><span>          </span><span class="annot"><span class="annottext">CoreExpr -&gt; Scaled Type -&gt; Type -&gt; [Alt Var] -&gt; CoreExpr
</span><a href="GHC.Core.Make.html#mkWildCase"><span class="hs-identifier hs-var">mkWildCase</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; CoreExpr
forall b. Var -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829123"><span class="hs-identifier hs-var">eqR</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Scaled Type
forall a. a -&gt; Scaled a
</span><a href="GHC.Core.Type.html#unrestricted"><span class="hs-identifier hs-var">unrestricted</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829141"><span class="hs-identifier hs-var">eqRTy</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829135"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">([Alt Var] -&gt; CoreExpr) -&gt; [Alt Var] -&gt; CoreExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-1540"></span><span>          </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; AltCon
</span><a href="GHC.Core.html#DataAlt"><span class="hs-identifier hs-var">DataAlt</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="GHC.Builtin.Types.html#coercibleDataCon"><span class="hs-identifier hs-var">coercibleDataCon</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829121"><span class="hs-identifier hs-var">eq</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; Coercion -&gt; CoreExpr
forall b. Expr b -&gt; Coercion -&gt; Expr b
</span><a href="GHC.Core.html#Cast"><span class="hs-identifier hs-var">Cast</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; CoreExpr
forall b. Var -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829122"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Var -&gt; Coercion
</span><a href="GHC.Core.Coercion.html#mkCoVarCo"><span class="hs-identifier hs-var">mkCoVarCo</span></a></span><span> </span><span class="annot"><span class="annottext">Var
</span><a href="#local-6989586621680829121"><span class="hs-identifier hs-var">eq</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-1541"></span><span>
</span><span id="line-1542"></span><span class="hs-comment">{-
Note [seqId magic]
~~~~~~~~~~~~~~~~~~
'GHC.Prim.seq' is special in several ways.

a) Its fixity is set in GHC.Iface.Load.ghcPrimIface

b) It has quite a bit of desugaring magic.
   See GHC.HsToCore.Utils Note [Desugaring seq (1)] and (2) and (3)

c) There is some special rule handing: Note [User-defined RULES for seq]

Historical note:
    In GHC.Tc.Gen.Expr we used to need a special typing rule for 'seq', to handle calls
    whose second argument had an unboxed type, e.g.  x `seq` 3#

    However, with levity polymorphism we can now give seq the type seq ::
    forall (r :: RuntimeRep) a (b :: TYPE r). a -&gt; b -&gt; b which handles this
    case without special treatment in the typechecker.

Note [User-defined RULES for seq]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Roman found situations where he had
      case (f n) of _ -&gt; e
where he knew that f (which was strict in n) would terminate if n did.
Notice that the result of (f n) is discarded. So it makes sense to
transform to
      case n of _ -&gt; e

Rather than attempt some general analysis to support this, I've added
enough support that you can do this using a rewrite rule:

  RULE &quot;f/seq&quot; forall n.  seq (f n) = seq n

You write that rule.  When GHC sees a case expression that discards
its result, it mentally transforms it to a call to 'seq' and looks for
a RULE.  (This is done in GHC.Core.Opt.Simplify.trySeqRules.)  As usual, the
correctness of the rule is up to you.

VERY IMPORTANT: to make this work, we give the RULE an arity of 1, not 2.
If we wrote
  RULE &quot;f/seq&quot; forall n e.  seq (f n) e = seq n e
with rule arity 2, then two bad things would happen:

  - The magical desugaring done in Note [seqId magic] item (b)
    for saturated application of 'seq' would turn the LHS into
    a case expression!

  - The code in GHC.Core.Opt.Simplify.rebuildCase would need to actually supply
    the value argument, which turns out to be awkward.

See also: Note [User-defined RULES for seq] in GHC.Core.Opt.Simplify.


Note [lazyId magic]
~~~~~~~~~~~~~~~~~~~
lazy :: forall a?. a? -&gt; a?   (i.e. works for unboxed types too)

'lazy' is used to make sure that a sub-expression, and its free variables,
are truly used call-by-need, with no code motion.  Key examples:

* pseq:    pseq a b = a `seq` lazy b
  We want to make sure that the free vars of 'b' are not evaluated
  before 'a', even though the expression is plainly strict in 'b'.

* catch:   catch a b = catch# (lazy a) b
  Again, it's clear that 'a' will be evaluated strictly (and indeed
  applied to a state token) but we want to make sure that any exceptions
  arising from the evaluation of 'a' are caught by the catch (see
  #11555).

Implementing 'lazy' is a bit tricky:

* It must not have a strictness signature: by being a built-in Id,
  all the info about lazyId comes from here, not from GHC.Base.hi.
  This is important, because the strictness analyser will spot it as
  strict!

* It must not have an unfolding: it gets &quot;inlined&quot; by a HACK in
  CorePrep. It's very important to do this inlining *after* unfoldings
  are exposed in the interface file.  Otherwise, the unfolding for
  (say) pseq in the interface file will not mention 'lazy', so if we
  inline 'pseq' we'll totally miss the very thing that 'lazy' was
  there for in the first place. See #3259 for a real world
  example.

* Suppose CorePrep sees (catch# (lazy e) b).  At all costs we must
  avoid using call by value here:
     case e of r -&gt; catch# r b
  Avoiding that is the whole point of 'lazy'.  So in CorePrep (which
  generate the 'case' expression for a call-by-value call) we must
  spot the 'lazy' on the arg (in CorePrep.cpeApp), and build a 'let'
  instead.

* lazyId is defined in GHC.Base, so we don't *have* to inline it.  If it
  appears un-applied, we'll end up just calling it.

Note [noinlineId magic]
~~~~~~~~~~~~~~~~~~~~~~~
noinline :: forall a. a -&gt; a

'noinline' is used to make sure that a function f is never inlined,
e.g., as in 'noinline f x'.  Ordinarily, the identity function with NOINLINE
could be used to achieve this effect; however, this has the unfortunate
result of leaving a (useless) call to noinline at runtime.  So we have
a little bit of magic to optimize away 'noinline' after we are done
running the simplifier.

'noinline' needs to be wired-in because it gets inserted automatically
when we serialize an expression to the interface format. See
Note [Inlining and hs-boot files] in GHC.CoreToIface

Note that noinline as currently implemented can hide some simplifications since
it hides strictness from the demand analyser. Specifically, the demand analyser
will treat 'noinline f x' as lazy in 'x', even if the demand signature of 'f'
specifies that it is strict in its argument. We considered fixing this this by adding a
special case to the demand analyser to address #16588. However, the special
case seemed like a large and expensive hammer to address a rare case and
consequently we rather opted to use a more minimal solution.

Note [The oneShot function]
~~~~~~~~~~~~~~~~~~~~~~~~~~~
In the context of making left-folds fuse somewhat okish (see ticket #7994
and Note [Left folds via right fold]) it was determined that it would be useful
if library authors could explicitly tell the compiler that a certain lambda is
called at most once. The oneShot function allows that.

'oneShot' is levity-polymorphic, i.e. the type variables can refer to unlifted
types as well (#10744); e.g.
   oneShot (\x:Int# -&gt; x +# 1#)

Like most magic functions it has a compulsory unfolding, so there is no need
for a real definition somewhere. We have one in GHC.Magic for the convenience
of putting the documentation there.

It uses `setOneShotLambda` on the lambda's binder. That is the whole magic:

A typical call looks like
     oneShot (\y. e)
after unfolding the definition `oneShot = \f \x[oneshot]. f x` we get
     (\f \x[oneshot]. f x) (\y. e)
 --&gt; \x[oneshot]. ((\y.e) x)
 --&gt; \x[oneshot] e[x/y]
which is what we want.

It is only effective if the one-shot info survives as long as possible; in
particular it must make it into the interface in unfoldings. See Note [Preserve
OneShotInfo] in GHC.Core.Tidy.

Also see https://gitlab.haskell.org/ghc/ghc/wikis/one-shot.


Note [magicDictId magic]
~~~~~~~~~~~~~~~~~~~~~~~~~
The identifier `magicDict` is just a place-holder, which is used to
implement a primitive that we cannot define in Haskell but we can write
in Core.  It is declared with a place-holder type:

    magicDict :: forall a. a

The intention is that the identifier will be used in a very specific way,
to create dictionaries for classes with a single method.  Consider a class
like this:

   class C a where
     f :: T a

We are going to use `magicDict`, in conjunction with a built-in Prelude
rule, to cast values of type `T a` into dictionaries for `C a`.  To do
this, we define a function like this in the library:

  data WrapC a b = WrapC (C a =&gt; Proxy a -&gt; b)

  withT :: (C a =&gt; Proxy a -&gt; b)
        -&gt;  T a -&gt; Proxy a -&gt; b
  withT f x y = magicDict (WrapC f) x y

The purpose of `WrapC` is to avoid having `f` instantiated.
Also, it avoids impredicativity, because `magicDict`'s type
cannot be instantiated with a forall.  The field of `WrapC` contains
a `Proxy` parameter which is used to link the type of the constraint,
`C a`, with the type of the `Wrap` value being made.

Next, we add a built-in Prelude rule (see GHC.Core.Opt.ConstantFold),
which will replace the RHS of this definition with the appropriate
definition in Core.  The rewrite rule works as follows:

  magicDict @t (wrap @a @b f) x y
----&gt;
  f (x `cast` co a) y

The `co` coercion is the newtype-coercion extracted from the type-class.
The type class is obtain by looking at the type of wrap.

In the constant folding rule it's very import to make sure to strip all ticks
from the expression as if there's an occurence of
magicDict we *must* convert it for correctness. See #19667 for where this went
wrong in GHCi.


-------------------------------------------------------------
@realWorld#@ used to be a magic literal, \tr{void#}.  If things get
nasty as-is, change it back to a literal (@Literal@).

voidArgId is a Local Id used simply as an argument in functions
where we just want an arg to avoid having a thunk of unlifted type.
E.g.
        x = \ void :: Void# -&gt; (# p, q #)

This comes up in strictness analysis

Note [evaldUnfoldings]
~~~~~~~~~~~~~~~~~~~~~~
The evaldUnfolding makes it look that some primitive value is
evaluated, which in turn makes Simplify.interestingArg return True,
which in turn makes INLINE things applied to said value likely to be
inlined.
-}</span><span>
</span><span id="line-1760"></span><span>
</span><span id="line-1761"></span><span class="annot"><a href="GHC.Types.Id.Make.html#realWorldPrimId"><span class="hs-identifier hs-type">realWorldPrimId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>   </span><span class="hs-comment">-- :: State# RealWorld</span><span>
</span><span id="line-1762"></span><span id="realWorldPrimId"><span class="annot"><span class="annottext">realWorldPrimId :: Var
</span><a href="GHC.Types.Id.Make.html#realWorldPrimId"><span class="hs-identifier hs-var hs-var">realWorldPrimId</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.Make.html#pcMiscPrelId"><span class="hs-identifier hs-var">pcMiscPrelId</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Types.Id.Make.html#realWorldName"><span class="hs-identifier hs-var">realWorldName</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#realWorldStatePrimTy"><span class="hs-identifier hs-var">realWorldStatePrimTy</span></a></span><span>
</span><span id="line-1763"></span><span>                     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#noCafIdInfo"><span class="hs-identifier hs-var">noCafIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Unfolding -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setUnfoldingInfo"><span class="hs-operator hs-var">`setUnfoldingInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">Unfolding
</span><a href="GHC.Core.html#evaldUnfolding"><span class="hs-identifier hs-var">evaldUnfolding</span></a></span><span>    </span><span class="hs-comment">-- Note [evaldUnfoldings]</span><span>
</span><span id="line-1764"></span><span>                                  </span><span class="annot"><span class="annottext">IdInfo -&gt; OneShotInfo -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setOneShotInfo"><span class="hs-operator hs-var">`setOneShotInfo`</span></a></span><span>   </span><span class="annot"><span class="annottext">OneShotInfo
</span><a href="GHC.Types.Id.html#stateHackOneShot"><span class="hs-identifier hs-var">stateHackOneShot</span></a></span><span>
</span><span id="line-1765"></span><span>                                  </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; IdInfo -&gt; Type -&gt; IdInfo
IdInfo -&gt; Type -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setNeverLevPoly"><span class="hs-operator hs-var">`setNeverLevPoly`</span></a></span><span>  </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#realWorldStatePrimTy"><span class="hs-identifier hs-var">realWorldStatePrimTy</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1766"></span><span>
</span><span id="line-1767"></span><span class="annot"><a href="GHC.Types.Id.Make.html#voidPrimId"><span class="hs-identifier hs-type">voidPrimId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>     </span><span class="hs-comment">-- Global constant :: Void#</span><span>
</span><span id="line-1768"></span><span id="voidPrimId"><span class="annot"><span class="annottext">voidPrimId :: Var
</span><a href="GHC.Types.Id.Make.html#voidPrimId"><span class="hs-identifier hs-var hs-var">voidPrimId</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.Make.html#pcMiscPrelId"><span class="hs-identifier hs-var">pcMiscPrelId</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Types.Id.Make.html#voidPrimIdName"><span class="hs-identifier hs-var">voidPrimIdName</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#voidPrimTy"><span class="hs-identifier hs-var">voidPrimTy</span></a></span><span>
</span><span id="line-1769"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#noCafIdInfo"><span class="hs-identifier hs-var">noCafIdInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; Unfolding -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setUnfoldingInfo"><span class="hs-operator hs-var">`setUnfoldingInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">Unfolding
</span><a href="GHC.Core.html#evaldUnfolding"><span class="hs-identifier hs-var">evaldUnfolding</span></a></span><span>     </span><span class="hs-comment">-- Note [evaldUnfoldings]</span><span>
</span><span id="line-1770"></span><span>                             </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; IdInfo -&gt; Type -&gt; IdInfo
IdInfo -&gt; Type -&gt; IdInfo
</span><a href="GHC.Types.Id.Info.html#setNeverLevPoly"><span class="hs-operator hs-var">`setNeverLevPoly`</span></a></span><span>  </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#voidPrimTy"><span class="hs-identifier hs-var">voidPrimTy</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1771"></span><span>
</span><span id="line-1772"></span><span class="annot"><a href="GHC.Types.Id.Make.html#voidArgId"><span class="hs-identifier hs-type">voidArgId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>       </span><span class="hs-comment">-- Local lambda-bound :: Void#</span><span>
</span><span id="line-1773"></span><span id="voidArgId"><span class="annot"><span class="annottext">voidArgId :: Var
</span><a href="GHC.Types.Id.Make.html#voidArgId"><span class="hs-identifier hs-var hs-var">voidArgId</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RuleName -&gt; Unique -&gt; Type -&gt; Type -&gt; Var
</span><a href="GHC.Types.Id.html#mkSysLocal"><span class="hs-identifier hs-var">mkSysLocal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; RuleName
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;void&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#voidArgIdKey"><span class="hs-identifier hs-var">voidArgIdKey</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Core.Type.html#Many"><span class="hs-identifier hs-var">Many</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.Prim.html#voidPrimTy"><span class="hs-identifier hs-var">voidPrimTy</span></a></span><span>
</span><span id="line-1774"></span><span>
</span><span id="line-1775"></span><span class="annot"><a href="GHC.Types.Id.Make.html#coercionTokenId"><span class="hs-identifier hs-type">coercionTokenId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>         </span><span class="hs-comment">-- :: () ~ ()</span><span>
</span><span id="line-1776"></span><span id="coercionTokenId"><span class="annot"><span class="annottext">coercionTokenId :: Var
</span><a href="GHC.Types.Id.Make.html#coercionTokenId"><span class="hs-identifier hs-var hs-var">coercionTokenId</span></a></span></span><span> </span><span class="hs-comment">-- See Note [Coercion tokens] in &quot;GHC.CoreToStg&quot;</span><span>
</span><span id="line-1777"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.Make.html#pcMiscPrelId"><span class="hs-identifier hs-var">pcMiscPrelId</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="GHC.Types.Id.Make.html#coercionTokenName"><span class="hs-identifier hs-var">coercionTokenName</span></a></span><span>
</span><span id="line-1778"></span><span>                 </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; [Type] -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#mkTyConApp"><span class="hs-identifier hs-var">mkTyConApp</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="GHC.Builtin.Types.Prim.html#eqPrimTyCon"><span class="hs-identifier hs-var">eqPrimTyCon</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.html#liftedTypeKind"><span class="hs-identifier hs-var">liftedTypeKind</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.html#liftedTypeKind"><span class="hs-identifier hs-var">liftedTypeKind</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.html#unitTy"><span class="hs-identifier hs-var">unitTy</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Builtin.Types.html#unitTy"><span class="hs-identifier hs-var">unitTy</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-1779"></span><span>                 </span><span class="annot"><span class="annottext">IdInfo
</span><a href="GHC.Types.Id.Info.html#noCafIdInfo"><span class="hs-identifier hs-var">noCafIdInfo</span></a></span><span>
</span><span id="line-1780"></span><span>
</span><span id="line-1781"></span><span class="annot"><a href="GHC.Types.Id.Make.html#pcMiscPrelId"><span class="hs-identifier hs-type">pcMiscPrelId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Id.Info.html#IdInfo"><span class="hs-identifier hs-type">IdInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span>
</span><span id="line-1782"></span><span id="pcMiscPrelId"><span class="annot"><span class="annottext">pcMiscPrelId :: Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.Make.html#pcMiscPrelId"><span class="hs-identifier hs-var hs-var">pcMiscPrelId</span></a></span></span><span> </span><span id="local-6989586621680829108"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829108"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680829107"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829107"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621680829106"><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680829106"><span class="hs-identifier hs-var">info</span></a></span></span><span>
</span><span id="line-1783"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Type -&gt; IdInfo -&gt; Var
</span><a href="GHC.Types.Id.html#mkVanillaGlobalWithInfo"><span class="hs-identifier hs-var">mkVanillaGlobalWithInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680829108"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680829107"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">IdInfo
</span><a href="#local-6989586621680829106"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-1784"></span><span>    </span><span class="hs-comment">-- We lie and say the thing is imported; otherwise, we get into</span><span>
</span><span id="line-1785"></span><span>    </span><span class="hs-comment">-- a mess with dependency analysis; e.g., core2stg may heave in</span><span>
</span><span id="line-1786"></span><span>    </span><span class="hs-comment">-- random calls to GHCbase.unpackPS__.  If GHCbase is the module</span><span>
</span><span id="line-1787"></span><span>    </span><span class="hs-comment">-- being compiled, then it's just a matter of luck if the definition</span><span>
</span><span id="line-1788"></span><span>    </span><span class="hs-comment">-- will be in &quot;the right place&quot; to be in scope.</span><span>
</span><span id="line-1789"></span></pre></body></html>